From 2932dd57bf9c0add762d19f4aae07678e635fa48 Mon Sep 17 00:00:00 2001 From: Matheus Date: Sat, 27 Jun 2026 13:32:04 -0300 Subject: [PATCH] ports: openmotif --- patches/openmotif/jinx-working-patch.patch | 138 +++++++++++++++++++++ recipes/openmotif | 29 +++++ source-recipes/openmotif | 10 ++ 3 files changed, 177 insertions(+) create mode 100644 patches/openmotif/jinx-working-patch.patch create mode 100644 recipes/openmotif create mode 100644 source-recipes/openmotif diff --git a/patches/openmotif/jinx-working-patch.patch b/patches/openmotif/jinx-working-patch.patch new file mode 100644 index 00000000..58dd7513 --- /dev/null +++ b/patches/openmotif/jinx-working-patch.patch @@ -0,0 +1,138 @@ +diff --git openmotif-workdir/AUTHORS openmotif-workdir/AUTHORS +new file mode 100644 +index 0000000..e69de29 +diff --git openmotif-workdir/NEWS openmotif-workdir/NEWS +new file mode 100644 +index 0000000..e69de29 +diff --git openmotif-clean/lib/Xm/XpmCrBufFrI.c openmotif-workdir/lib/Xm/XpmCrBufFrI.c +index 5fa9563..089d892 100644 +--- openmotif-clean/lib/Xm/XpmCrBufFrI.c ++++ openmotif-workdir/lib/Xm/XpmCrBufFrI.c +@@ -44,6 +44,7 @@ + /* October 2004, source code review by Thomas Biege */ + + #include "XpmI.h" ++#include + + LFUNC(WriteColors, int, (char **dataptr, unsigned int *data_size, + unsigned int *used_size, XpmColor *colors, +diff --git openmotif-clean/lib/Xm/XpmCrDatFrI.c openmotif-workdir/lib/Xm/XpmCrDatFrI.c +index 5d34114..6b5e34b 100644 +--- openmotif-clean/lib/Xm/XpmCrDatFrI.c ++++ openmotif-workdir/lib/Xm/XpmCrDatFrI.c +@@ -41,6 +41,7 @@ + /* October 2004, source code review by Thomas Biege */ + + #include "XpmI.h" ++#include + + LFUNC(CreateColors, int, (char **dataptr, unsigned int *data_size, + XpmColor *colors, unsigned int ncolors, +diff --git openmotif-clean/lib/Xm/XpmRdFToI.c openmotif-workdir/lib/Xm/XpmRdFToI.c +index 6af58dc..cf18366 100644 +--- openmotif-clean/lib/Xm/XpmRdFToI.c ++++ openmotif-workdir/lib/Xm/XpmRdFToI.c +@@ -41,6 +41,7 @@ + /* October 2004, source code review by Thomas Biege */ + + #include "XpmI.h" ++#include + #include + #include + #if !defined(NO_ZPIPE) && defined(WIN32) +diff --git openmotif-clean/lib/Xm/XpmWrFFrBuf.c openmotif-workdir/lib/Xm/XpmWrFFrBuf.c +index b3663b5..7f84f96 100644 +--- openmotif-clean/lib/Xm/XpmWrFFrBuf.c ++++ openmotif-workdir/lib/Xm/XpmWrFFrBuf.c +@@ -41,6 +41,7 @@ + /* October 2004, source code review by Thomas Biege */ + + #include "XpmI.h" ++#include + + int + XpmWriteFileFromBuffer(filename, buffer) +diff --git openmotif-clean/lib/Xm/XpmWrFFrI.c openmotif-workdir/lib/Xm/XpmWrFFrI.c +index 1eaf1c9..6c3ae58 100644 +--- openmotif-clean/lib/Xm/XpmWrFFrI.c ++++ openmotif-workdir/lib/Xm/XpmWrFFrI.c +@@ -41,6 +41,7 @@ + /* October 2004, source code review by Thomas Biege */ + + #include "XpmI.h" ++#include + #if !defined(NO_ZPIPE) && defined(WIN32) + # define popen _popen + # define pclose _pclose +diff --git openmotif-clean/lib/Xm/Xpmcreate.c openmotif-workdir/lib/Xm/Xpmcreate.c +index d0f3c3b..e865ec2 100644 +--- openmotif-clean/lib/Xm/Xpmcreate.c ++++ openmotif-workdir/lib/Xm/Xpmcreate.c +@@ -47,6 +47,7 @@ + /* October 2004, source code review by Thomas Biege */ + + #include "XpmI.h" ++#include + #include + + LFUNC(xpmVisualType, int, (Visual *visual)); +diff --git openmotif-clean/lib/Xm/Xpmdata.c openmotif-workdir/lib/Xm/Xpmdata.c +index d65ae57..0819195 100644 +--- openmotif-clean/lib/Xm/Xpmdata.c ++++ openmotif-workdir/lib/Xm/Xpmdata.c +@@ -47,6 +47,7 @@ static char *RCS_Id = "$XpmId: xpm.shar,v 3.62 96/09/14 02:33:07 lehors Exp $"; + + + #include "XpmI.h" ++#include + #include + + +diff --git openmotif-clean/lib/Xm/Xpmhashtab.c openmotif-workdir/lib/Xm/Xpmhashtab.c +index 2548912..d951f1b 100644 +--- openmotif-clean/lib/Xm/Xpmhashtab.c ++++ openmotif-workdir/lib/Xm/Xpmhashtab.c +@@ -40,6 +40,7 @@ + + + #include "XpmI.h" ++#include + + LFUNC(AtomMake, xpmHashAtom, (char *name, void *data)); + LFUNC(HashTableGrows, int, (xpmHashTable * table)); +diff --git openmotif-clean/lib/Xm/Xpmmisc.c openmotif-workdir/lib/Xm/Xpmmisc.c +index d51e110..3bab47d 100644 +--- openmotif-clean/lib/Xm/Xpmmisc.c ++++ openmotif-workdir/lib/Xm/Xpmmisc.c +@@ -41,6 +41,7 @@ + /* we don't want the XpmFree macro since we define the XpmFree function here */ + #define NO_XPMFREE_MACRO + #include "XpmI.h" ++#include + + #ifdef NEED_STRDUP + /* +diff --git openmotif-clean/lib/Xm/Xpmrgb.c openmotif-workdir/lib/Xm/Xpmrgb.c +index 1234042..342e10c 100644 +--- openmotif-clean/lib/Xm/Xpmrgb.c ++++ openmotif-workdir/lib/Xm/Xpmrgb.c +@@ -49,6 +49,7 @@ + + + #include "XpmI.h" ++#include + #include + + #ifndef FOR_MSW /* normal part first, MSW part at +diff --git openmotif-clean/lib/Xm/Xpmscan.c openmotif-workdir/lib/Xm/Xpmscan.c +index f458b6d..4225f25 100644 +--- openmotif-clean/lib/Xm/Xpmscan.c ++++ openmotif-workdir/lib/Xm/Xpmscan.c +@@ -46,6 +46,7 @@ + /* October 2004, source code review by Thomas Biege */ + + #include "XpmI.h" ++#include + + #define MAXPRINTABLE 92 /* number of printable ascii chars + * minus \ and " for string compat diff --git a/recipes/openmotif b/recipes/openmotif new file mode 100644 index 00000000..b9a110f3 --- /dev/null +++ b/recipes/openmotif @@ -0,0 +1,29 @@ +name=openmotif +revision=1 +from_source=openmotif +imagedeps="build-essential" +hostdeps="xgcc xbinutils pkgconfig libtool" +deps="base libx11 libxext libxft libxmu libxpm libxt fontconfig freetype xbitmaps xorgproto" + +configure() { + ac_cv_func_setpgrp_void=yes ac_cv_func_memcmp_working=yes \ + CPPFLAGS="${CPPFLAGS} -D_GNU_SOURCE -I${sysroot_dir}${prefix}/include/freetype2" \ + ${source_dir}/configure --prefix=${prefix} --host=x86_64-astral --enable-shared --disable-static --disable-printing +} + +build() { + for dir in bindings bitmaps config localized; do + make -C ${dir} -j1 + done + ${CC_FOR_BUILD:-cc} -std=gnu89 -I${sysroot_dir}${prefix}/include -Iinclude -Ilib/Xm -I${source_dir}/config/util \ + -o config/util/makestrs ${source_dir}/config/util/makestrs.c + for dir in lib include; do + make -C ${dir} -j1 + done +} + +package() { + for dir in bindings bitmaps localized lib include; do + make -C ${dir} DESTDIR=${dest_dir} install + done +} diff --git a/source-recipes/openmotif b/source-recipes/openmotif new file mode 100644 index 00000000..18da1dbf --- /dev/null +++ b/source-recipes/openmotif @@ -0,0 +1,10 @@ +name=openmotif +version=2.3.8 +source_method=tarball +tarball_url="https://sourceforge.net/projects/motif/files/Motif%202.3.8%20Source%20Code/motif-${version}.tar.gz/download" +tarball_sha512="1ab8e8eece25ef97e948592b5fa3e19d98e932695290a18b7a8e90f1aa2766bc4f082bdbc3999dff5660e684821178a149040f76bb477163e53ca06474d02b55" +hostdeps="autoconf automake util-macros pkgconfig libtool" + +prepare() { + autoreconf -fvi +}