Skip to content

Commit

Permalink
print/hp2xx: Optionize INFO
Browse files Browse the repository at this point in the history
- Utilize USES=localbase
- Pet portclippy
  • Loading branch information
5u623l20 committed Oct 24, 2023
1 parent 05056ba commit a394e0c
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 25 deletions.
26 changes: 16 additions & 10 deletions print/hp2xx/Makefile
Expand Up @@ -13,26 +13,32 @@ LICENSE= GPLv2+
LIB_DEPENDS= libpng.so:graphics/png \
libtiff.so:graphics/tiff

WRKSRC_SUBDIR= sources
USES= jpeg localbase:ldflags

USES= makeinfo
MAKE_ARGS= infodir=${PREFIX}/${INFO_PATH}
MAKE_ENV= DEFINES="${CPPFLAGS}" ALL_LIBS="${LDFLAGS}"

CPPFLAGS+= -DUNIX -I${LOCALBASE}/include
LDFLAGS+= -lm -L${LOCALBASE}/lib -ltiff -lpng -lz
CPPFLAGS+= -DUNIX
LDFLAGS+= -lm -ltiff -lpng -lz

WRKSRC_SUBDIR= sources

INFO= hp2xx
PLIST_FILES= bin/hp2xx man/man1/hp2xx.1.gz

OPTIONS_DEFINE= X11
OPTIONS_DEFAULT= X11
OPTIONS_DEFINE= INFO X11
OPTIONS_DEFAULT= INFO X11

INFO_USES= makeinfo
INFO_MAKE_ARGS= infodir=${PREFIX}/${INFO_PATH}
INFO_INFO= hp2xx
X11_USES= xorg
X11_USE= XORG=x11
X11_MAKE_ENV= PREVIEWER=to_x11
X11_MAKE_ENV_OFF= PREVIEWER=no_prev
X11_CPPFLAGS= -DHAS_UNIX_X11 -I${LOCALBASE}/include
X11_LDFLAGS= -L${LOCALBASE}/lib -lX11
X11_CPPFLAGS= -DHAS_UNIX_X11
X11_LDFLAGS= -lX11

post-patch-INFO-off:
@${REINPLACE_CMD} -e '/^all:/s|hp2xx.info||g; \
/^install:/s|install-info||g' ${WRKSRC}/Makefile

.include <bsd.port.mk>
29 changes: 17 additions & 12 deletions print/hp2xx/files/patch-Makefile
@@ -1,6 +1,6 @@
--- Makefile.orig Sun Jun 22 00:16:34 2003
+++ Makefile Tue Jun 24 07:53:46 2003
@@ -35,7 +35,7 @@
--- Makefile.orig 2003-06-21 15:16:34 UTC
+++ Makefile
@@ -35,7 +35,7 @@ STRIP = strip

# Installation sites (GNU conventions):
#
Expand All @@ -9,7 +9,7 @@
bindir = $(prefix)/bin
includedir = $(prefix)/include
mandir = $(prefix)/man
@@ -45,14 +45,14 @@
@@ -45,14 +45,14 @@ infodir = $(prefix)/info
# CC and CFLAGS set for gcc, but any ANSI-C compiler should work.
# For non-gcc compilers, simply set CFLAGS = -O (to start with)
#
Expand All @@ -27,7 +27,7 @@
CPPFLAGS = -I. # only sometimes needed; see below for examples
BINDCMD = # only needed for EMX and DJGPP DOS extenders

@@ -65,9 +65,9 @@
@@ -65,9 +65,9 @@ BINDCMD = # only needed for EMX and DJ
#
# Generic UNIX + X11 previewer (default)
#
Expand All @@ -40,7 +40,7 @@
#
# for experimental truetype font support
#
@@ -230,13 +230,13 @@
@@ -230,13 +230,13 @@ ALL_CFLAGS = -c $(CFLAGS)

# $(SRCS) NOT USED YET:
SRCS = clip.c fillpoly.c\
Expand All @@ -56,17 +56,18 @@
to_vec.o to_pcx.o to_pcl.o to_eps.o to_img.o to_pbm.o \
to_rgip.o to_fig.o std_main.o $(PREVIEWER).o pendef.o lindef.o $(EX_OBJ)

@@ -244,7 +244,8 @@
@@ -244,8 +244,9 @@ PROGRAM = hp2xx

$(PROGRAM): $(OBJS)
$(CC) $(LFLAGS) $(OBJS) $(ALL_LIBS) $(EX_LIBS) -o $(PROGRAM)
- $(BINDCMD)
+
+all: $(PROGRAM) hp2xx.info

+all: $(PROGRAM)
+
default:
@echo "This makefile needs manual configuration! Edit it now!
@@ -268,9 +269,9 @@
@echo "After configuration, you may use the following commands:
@@ -268,9 +269,9 @@ default:
# #
#########################################################################

Expand All @@ -79,8 +80,12 @@


#########################################################################
@@ -330,15 +331,11 @@
install: install-bin install-info install-man
@@ -327,18 +328,14 @@ realclean:
TAGS:
@echo make TAGS -- not supported nor needed.

-install: install-bin install-info install-man
+install: install-bin install-man

install-bin: $(PROGRAM)
- -$(STRIP) $(PROGRAM)
Expand Down
6 changes: 3 additions & 3 deletions print/hp2xx/files/patch-png.c
@@ -1,5 +1,5 @@
--- png.c.orig 2003-06-21 17:31:51.000000000 +0200
+++ png.c 2012-05-06 06:59:14.000000000 +0200
--- png.c.orig 2003-06-21 15:31:51 UTC
+++ png.c
@@ -6,6 +6,7 @@
#include <stdlib.h>
#include "to_png.h"
Expand All @@ -8,7 +8,7 @@

#define PDNCOL 256

@@ -36,7 +37,7 @@
@@ -36,7 +37,7 @@ FILE *fd;
}

/* set up error handlimg for libpng */
Expand Down

0 comments on commit a394e0c

Please sign in to comment.