On Sat, Jan 29, 2022 at 04:44:51PM +0100, Antoine Jacoutot wrote:
> On Sat, Jan 29, 2022 at 02:38:12PM +0100, Volker Schlecht wrote:
> > 
> > > New diff without gsc.
> > > We can decide over a solution for this later. Either make the packages
> > > explicitely conflict or rename the binary.
> > 
> > I'm watching your tweaks and taking notes, but what's the point in keeping
> > around all three, and particularly why do we want to keep the statically
> > linked bin/gs ?
> 
> You're right, let me cook something better.

Alright, new diff.

- drop uneeded CFLAGS in both places
- add DEBUG_PACKAGES
- install gsc as gs (dynamic binary)
- only include gsx in the gtk FLAVOR (it's supposed to be the gtk loader,
otherwise it behaves as gs); could be a multi_package instead but that's for
another day
- siplify post-install dance


Index: Makefile
===================================================================
RCS file: /cvs/ports/print/ghostscript/gnu/Makefile,v
retrieving revision 1.120
diff -u -p -r1.120 Makefile
--- Makefile    29 Jan 2022 07:37:14 -0000      1.120
+++ Makefile    29 Jan 2022 17:02:24 -0000
@@ -6,7 +6,7 @@ VERSION =       9.55.0
 DISTNAME =     ghostscript-${VERSION}
 CATEGORIES =   lang print
 SHARED_LIBS =  gs 16.0
-REVISION =     0
+REVISION =     1
 
 MASTER_SITES = 
https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs${VERSION:S/.//g}/
 
@@ -42,8 +42,6 @@ LIB_DEPENDS +=        print/cups,-libs
 LIB_DEPENDS += print/ijs
 LIB_DEPENDS += print/libpaper
 
-CFLAGS =       -DSYS_TYPES_HAS_STDINT_TYPES
-
 MAKE_FLAGS =   LIB_VERSION_MAJOR=${LIBgs_VERSION:R} \
                LIB_VERSION_MINOR=${LIBgs_VERSION:E}
 
@@ -78,7 +76,6 @@ WANTLIB +=    glib-2.0 gobject-2.0 gtk-3 ha
 WANTLIB +=     pangocairo-1.0
 CONFIGURE_ARGS +=      --enable-gtk
 .elif ${FLAVOR:Mno_x11}
-CFLAGS +=      "-I/usr/X11R6/include/"
 CONFIGURE_ARGS +=      --disable-dbus
 CONFIGURE_ARGS +=      --disable-gtk
 CONFIGURE_ARGS +=      --without-x
@@ -96,6 +93,9 @@ CFLAGS +=     -DA4
 CONFIGURE_ENV +=       LDFLAGS="-L${LOCALBASE}/lib"
 
 NO_TEST =      Yes
+
+DEBUG_PACKAGES =       ${BUILD_PACKAGES}
+
 # Just delete all the bundled directories that are not needed
 pre-configure:
        rm -rf ${WRKSRC}/freetype && \
@@ -109,18 +109,8 @@ pre-configure:
        rm -rf ${WRKSRC}/zlib
 
 post-install:
-       if [ -x ${PREFIX}/bin/gsc ]; then \
-               mv ${PREFIX}/bin/gsc ${PREFIX}/bin/gs; \
-       fi
-       if [ -x ${PREFIX}/bin/gsx ]; then \
-               mv ${PREFIX}/bin/gsx ${PREFIX}/bin/gs; \
-       fi
-       if [ -x ${PREFIX}/lib/libgs.so ]; then \
-               rm ${PREFIX}/lib/libgs.so; \
-       fi
-       if [ -x ${PREFIX}/lib/libgs.so.${LIBgs_VERSION:R} ]; then \
-               rm ${PREFIX}/lib/libgs.so.${LIBgs_VERSION:R}; \
-       fi
-       ${STRIP} ${PREFIX}/bin/gs
+       rm -f ${PREFIX}/lib/libgs.so{,.${LIBgs_VERSION:R}}
+# rename the dynamic binary
+       mv ${PREFIX}/bin/{gsc,gs}
 
 .include <bsd.port.mk>
Index: pkg/PFRAG.gtk
===================================================================
RCS file: pkg/PFRAG.gtk
diff -N pkg/PFRAG.gtk
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ pkg/PFRAG.gtk       29 Jan 2022 17:02:24 -0000
@@ -0,0 +1,2 @@
+@comment $OpenBSD$
+@bin bin/gsx
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/print/ghostscript/gnu/pkg/PLIST,v
retrieving revision 1.30
diff -u -p -r1.30 PLIST
--- pkg/PLIST   27 Jan 2022 20:55:01 -0000      1.30
+++ pkg/PLIST   29 Jan 2022 17:02:24 -0000
@@ -271,3 +271,4 @@ share/ghostscript/${VERSION}/lib/viewpcx
 share/ghostscript/${VERSION}/lib/viewps2a.ps
 share/ghostscript/${VERSION}/lib/winmaps.ps
 share/ghostscript/${VERSION}/lib/zeroline.ps
+%%gtk%%


Reply via email to