pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

ximaging: various portability fixes.



Module Name:	pkgsrc-wip
Committed By:	Paolo Vincenzo Olivo <vms%retrobsd.ddns.net@localhost>
Pushed By:	vms
Date:		Sat Nov 19 10:44:41 2022 +0100
Changeset:	54002e77f16a007277c29924a82dad0a96c8c261

Modified Files:
	ximaging/Makefile
	ximaging/distinfo
Added Files:
	ximaging/patches/patch-mf_Makefile.Linux
	ximaging/patches/patch-mf_Makefile.Tribblix

Log Message:
ximaging: various portability fixes.

- do not require gmake on Linux and SunOS targets.
- standardize compiler, linker and make flags.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=54002e77f16a007277c29924a82dad0a96c8c261

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 ximaging/Makefile                           | 14 +++++++----
 ximaging/distinfo                           |  2 ++
 ximaging/patches/patch-mf_Makefile.Linux    | 37 +++++++++++++++++++++++++++++
 ximaging/patches/patch-mf_Makefile.Tribblix | 22 +++++++++++++++++
 4 files changed, 70 insertions(+), 5 deletions(-)

diffs:
diff --git a/ximaging/Makefile b/ximaging/Makefile
index 5a03c138f0..768e37967f 100644
--- a/ximaging/Makefile
+++ b/ximaging/Makefile
@@ -11,11 +11,15 @@ HOMEPAGE=	https://fastestcode.org/emwm.html
 COMMENT=	Image browser and viewer for Unix - X/Motif
 LICENSE=	mit
 
-.include "../../mk/bsd.fast.prefs.mk"
-
-.if !${OPSYS:M*BSD}
-USE_TOOLS+=	gmake
-.endif
+MAKE_FLAGS+=	CC?=${CC:Q}
+MAKE_FLAGS+=	CFLAGS=${CFLAGS:Q}
+MAKE_FLAGS+=	CFLAGS+="-fopenmp -DENABLE_OMP"
+MAKE_FLAGS+=	LDFLAGS=${LDFLAGS:Q}
+MAKE_FLAGS+=	LDFLAGS+="-fopenmp -pthread"
+MAKE_FLAGS+=	PNG_LIBS=-lpng16
+MAKE_FLAGS+=	PREFIX=${PREFIX}
+MAKE_FLAGS+=	MANDIR=${PREFIX}/${PKGMANDIR}
+MAKE_FLAGS+=	APPLRESDIR=${PREFIX}/lib/X11/app-defaults
 
 INSTALLATION_DIRS=	bin ${PKGMANDIR}/man1
 INSTALLATION_DIRS+=	lib/X11/app-defaults
diff --git a/ximaging/distinfo b/ximaging/distinfo
index a2b6cdb398..f8c7bacc84 100644
--- a/ximaging/distinfo
+++ b/ximaging/distinfo
@@ -3,3 +3,5 @@ $NetBSD$
 BLAKE2s (ximaging-src-1.6.tar.xz) = 8733d6719dc05ccacf28b84da77e2fdf17a539a7d1f3b917a35dd22ccffa923c
 SHA512 (ximaging-src-1.6.tar.xz) = a9625bc5262641ec38e5d0248154caf78c724e6050820af1efa2cade15fea871e852338dcf0274d8407200ced74dd9800599773e932724c87ca2f06e78c03277
 Size (ximaging-src-1.6.tar.xz) = 99064 bytes
+SHA1 (patch-mf_Makefile.Linux) = 0b7fcd2f55f111258f099f5667611d2253e51169
+SHA1 (patch-mf_Makefile.Tribblix) = 23abe40fea1f0131bd972d40c36d41047ad02398
diff --git a/ximaging/patches/patch-mf_Makefile.Linux b/ximaging/patches/patch-mf_Makefile.Linux
new file mode 100644
index 0000000000..38a802138e
--- /dev/null
+++ b/ximaging/patches/patch-mf_Makefile.Linux
@@ -0,0 +1,37 @@
+$NetBSD$
+
+Portability fixes for bmake.
+
+--- mf/Makefile.Linux.orig	2022-07-31 15:43:05.000000000 +0000
++++ mf/Makefile.Linux
+@@ -15,24 +15,22 @@ CFLAGS = -O2 -Wall $(INCDIRS)
+ LDFLAGS = -pthread
+ 
+ # OpenMP loop optimizations
+-ifdef ENABLE_OMP
++.ifdef ENABLE_OMP
+ CFLAGS += -fopenmp -DENABLE_OMP
+ LDFLAGS += -fopenmp
+-endif
++.endif
+ 
+ # Common Desktop Environment support
+-ifdef ENABLE_CDE
++.ifdef ENABLE_CDE
+ CFLAGS += -DENABLE_CDE
+ IPC_OBJS = tooltalk.o
+ CDE_LIBS = -lDtHelp -lDtSvc -ltt
+ INCDIRS += -I/usr/dt/include
+ LIBDIRS += -L/usr/dt/lib
+-else
++.else
+ IPC_OBJS = xipc.o
+-endif
++.endif
+ 
+-include common.mf
++.include "common.mf"
+ 
+ install: common_install
+-
+--include .depend
diff --git a/ximaging/patches/patch-mf_Makefile.Tribblix b/ximaging/patches/patch-mf_Makefile.Tribblix
new file mode 100644
index 0000000000..1897350a25
--- /dev/null
+++ b/ximaging/patches/patch-mf_Makefile.Tribblix
@@ -0,0 +1,22 @@
+$NetBSD$
+
+Portability fix for bmake.
+Do not assume Motif to be packaged without Xft.
+
+--- mf/Makefile.Tribblix.orig	2022-07-31 15:43:05.000000000 +0000
++++ mf/Makefile.Tribblix
+@@ -14,12 +14,6 @@ CFLAGS = -O2 -Wall $(INCDIRS)
+ LDFLAGS = -pthread
+ IPC_OBJS = xipc.o
+ 
+-include common.mf
++.include "common.mf"
+ 
+-install:
+-	install -m 775 -f $(PREFIX)/bin ximaging
+-	install -m 664 -f $(MANDIR)/man1 ximaging.1
+-	# While Tribblix packages Motif with no Xft
+-	sed '/renderTable/d' XImaging.ad > XImaging
+-	install -m 664 -f $(APPLRESDIR) XImaging
+-	rm XImaging
++install: common_install


Home | Main Index | Thread Index | Old Index