aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornaddy <naddy@FreeBSD.org>2003-06-30 09:08:31 +0800
committernaddy <naddy@FreeBSD.org>2003-06-30 09:08:31 +0800
commitdc635589fd7b4b0eaf47d410d279d606ab0b57f3 (patch)
tree59879ffecafc8f08a263834d5f2694cdb0997861
parent1b7532cfa6cc0fc8e247615408c112c9442863ef (diff)
downloadfreebsd-ports-gnome-dc635589fd7b4b0eaf47d410d279d606ab0b57f3.tar.gz
freebsd-ports-gnome-dc635589fd7b4b0eaf47d410d279d606ab0b57f3.tar.zst
freebsd-ports-gnome-dc635589fd7b4b0eaf47d410d279d606ab0b57f3.zip
Major clean-up:
- Simplify operating system/architecture handling. - Fix build on !i386. - Set ONLY_FOR_ARCHS. - Honor CC/CFLAGS. - Proper install. Inspired by PR: 53470 Submitted by: Mark Linimon <linimon@lonesome.com>
-rw-r--r--sysutils/dump9660/Makefile19
-rw-r--r--sysutils/dump9660/files/patch-Makefile16
2 files changed, 21 insertions, 14 deletions
diff --git a/sysutils/dump9660/Makefile b/sysutils/dump9660/Makefile
index c5eb9573113c..102a8029de03 100644
--- a/sysutils/dump9660/Makefile
+++ b/sysutils/dump9660/Makefile
@@ -20,14 +20,17 @@ MAN5= proto.5
MLINKS= mk9660.8 dump9660.8
USE_REINPLACE= yes
-.include <bsd.port.pre.mk>
-
-# 386(=i386), alpha, sparc
-# PowerPC should be OK, too
-OBJTYPE!= ${UNAME} -m | ${SED} -e 's;i.86;386;'
-MAKE_ENV += systype=${OPSYS} objtype=${OBJTYPE}
+ONLY_FOR_ARCHS= alpha i386 powerpc
+OBJTYPE= ${MACHINE_ARCH:S/i386/386/:S/powerpc/power/}
+MAKE_ENV= systype=${OPSYS} objtype=${OBJTYPE}
post-patch:
- ${REINPLACE_CMD} -e 's,@@LOCAL@@,${PREFIX},g' ${WRKSRC}/Makefile
+ ${REINPLACE_CMD} -e 's|@@LOCAL@@|${PREFIX}|g' ${WRKSRC}/Makefile
+ ${REINPLACE_CMD} -e 's|CC=.*|CC=${CC}|' \
+ -e 's|XCFLAGS=.*|XCFLAGS=${CFLAGS} -DFREEBSD|' \
+ ${WRKSRC}/Make.FreeBSD
+# The assembly files require pre-processing
+ cd ${WRKSRC}/libunix; \
+ for f in *.s; do ${MV} $$f $${f%.s}.S; done
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/sysutils/dump9660/files/patch-Makefile b/sysutils/dump9660/files/patch-Makefile
index b4ae98547528..5f7c234f0b93 100644
--- a/sysutils/dump9660/files/patch-Makefile
+++ b/sysutils/dump9660/files/patch-Makefile
@@ -1,6 +1,9 @@
---- Makefile.orig Sun Jun 2 06:32:39 2002
-+++ Makefile Sat Jan 18 16:46:15 2003
-@@ -51,14 +51,9 @@
+
+$FreeBSD$
+
+--- Makefile.orig Sun Jun 2 15:32:39 2002
++++ Makefile Mon Jun 30 02:54:48 2003
+@@ -51,14 +51,10 @@
# Plan 9 section two corresponds to Unix sections two and three
install: $(BINARIES)
@@ -12,9 +15,10 @@
- cp $(BINARIES) /usr/local/bin
- cp mk9660.man /usr/local/man/man8/mk9660.8
- cp proto.man /usr/local/man/man3/proto.3
-+ cp $(BINARIES) ${PREFIX}/bin
-+ cp mk9660.man ${PREFIX}/man/man8/mk9660.8
-+ cp proto.man ${PREFIX}/man/man5/proto.5
++ ${BSD_INSTALL_PROGRAM} dump9660 ${PREFIX}/bin
++ ${BSD_INSTALL_SCRIPT} mk9660 ${PREFIX}/bin
++ ${BSD_INSTALL_MAN} mk9660.man ${PREFIX}/man/man8/mk9660.8
++ ${BSD_INSTALL_MAN} proto.man ${PREFIX}/man/man5/proto.5
dump9660: $(OFILES) $(LIBS)
$(CC) -o $@ $(OFILES) $(LDFLAGS)