Subject: pkgsrc under HP-UX
To: None <port-hp700@netbsd.org, tech-pkg@netbsd.org>
From: SUNAGAWA Keiki <kei_sun@ba2.so-net.ne.jp>
List: tech-pkg
Date: 08/17/2000 01:58:43
Hi,
I've been playing with the idea to build our pkgsrc tree
under HP-UX and made some changes to pkgsrc/mk. Though
zoularis wasn't built so far, I'd like someone to review my
changes.
Since HP-UX had changed largely between 9.x and 10.x. I
haven't checked if the pach is valid under 9.x yet.
Comments, thoughts are appreciated.
--
SUNAGAWA Keiki <kei_sun@ba2.so-net.ne.jp>
diff -ruN /a/anoncvs/netbsd/pkgsrc/mk/HPUX.pkg.dist mk/HPUX.pkg.dist
--- /a/anoncvs/netbsd/pkgsrc/mk/HPUX.pkg.dist Thu Jan 1 09:00:00 1970
+++ mk/HPUX.pkg.dist Wed Jul 26 13:23:26 2000
@@ -0,0 +1,207 @@
+# Id: BSD.local.dist,v 1.30 1997/08/01 13:16:39 phk Exp
+# $Id$
+#
+
+/set type=dir uname=root gname=sys mode=0755
+.
+ bin
+ ..
+ emul
+ ..
+ etc
+ rc.d
+ ..
+ ..
+ include
+ ..
+ info
+ ..
+ lib
+ ..
+ libdata
+ tcl
+ ..
+ ..
+ libexec
+ ..
+ man
+ cat1
+ ..
+ cat2
+ ..
+ cat3
+ ..
+ cat4
+ ..
+ cat5
+ ..
+ cat6
+ ..
+ cat7
+ ..
+ cat8
+ ..
+ cat9
+ ..
+ catl
+ ..
+ catn
+ ..
+ ja_JP.EUC
+ cat1
+ ..
+ cat2
+ ..
+ cat3
+ ..
+ cat4
+ ..
+ cat5
+ ..
+ cat6
+ ..
+ cat7
+ ..
+ cat8
+ ..
+ cat9
+ ..
+ catl
+ ..
+ catn
+ ..
+ man1
+ ..
+ man2
+ ..
+ man3
+ ..
+ man4
+ ..
+ man5
+ ..
+ man6
+ ..
+ man7
+ ..
+ man8
+ ..
+ man9
+ ..
+ manl
+ ..
+ mann
+ ..
+ ..
+ man1
+ ..
+ man2
+ ..
+ man3
+ ..
+ man4
+ ..
+ man5
+ ..
+ man6
+ ..
+ man7
+ ..
+ man8
+ ..
+ man9
+ ..
+ manl
+ ..
+ mann
+ ..
+ ..
+ sbin
+ ..
+ share
+ aclocal
+ ..
+ dict
+ ..
+ doc
+ html
+ ..
+ ..
+ examples
+ ..
+ games
+ ..
+ locale
+ ..
+ misc
+ ..
+ nls
+ C
+ ..
+ da_DK.ISO_8859-1
+ ..
+ de_AT.ISO_8859-1
+ ..
+ de_CH.ISO_8859-1
+ ..
+ de_DE.ISO_8859-1
+ ..
+ el_GR.ISO_8859-7
+ ..
+ en_AU.ISO_8859-1
+ ..
+ en_CA.ISO_8859-1
+ ..
+ en_GB.ISO_8859-1
+ ..
+ en_US.ISO_8859-1
+ ..
+ es_ES.ISO_8859-1
+ ..
+ fi_FI.ISO_8859-1
+ ..
+ fr_BE.ISO_8859-1
+ ..
+ fr_CA.ISO_8859-1
+ ..
+ fr_CH.ISO_8859-1
+ ..
+ fr_FR.ISO_8859-1
+ ..
+ hr_HR.ISO_8859-2
+ ..
+ is_IS.ISO_8859-1
+ ..
+ it_CH.ISO_8859-1
+ ..
+ it_IT.ISO_8859-1
+ ..
+ ja_JP.EUC
+ ..
+ ko_KR.EUC
+ ..
+ lt_LN.ASCII
+ ..
+ lt_LN.ISO_8859-1
+ ..
+ lt_LN.ISO_8859-2
+ ..
+ nl_BE.ISO_8859-1
+ ..
+ nl_NL.ISO_8859-1
+ ..
+ no_NO.ISO_8859-1
+ ..
+ pt_PT.ISO_8859-1
+ ..
+ ru_SU.CP866
+ ..
+ ru_SU.KOI8-R
+ ..
+ sv_SE.ISO_8859-1
+ ..
+ ..
+ skel
+ ..
+ ..
+..
diff -ruN --exclude=CVS /a/anoncvs/netbsd/pkgsrc/mk/HPUX.x11.dist mk/HPUX.x11.dist
--- /a/anoncvs/netbsd/pkgsrc/mk/HPUX.x11.dist Thu Jan 1 09:00:00 1970
+++ mk/HPUX.x11.dist Tue Oct 26 15:53:53 1999
@@ -0,0 +1,287 @@
+# $Id$
+# FreeBSD Id: BSD.x11.dist,v 1.2 1997/06/10 07:55:10 asami Exp
+#
+
+/set type=dir uname=root gname=sys mode=0755
+.
+ bin
+ ..
+ etc
+ rc.d
+ ..
+ ..
+ include
+ X11
+ ICE
+ ..
+ PEX5
+ ..
+ PM
+ ..
+ SM
+ ..
+ Xaw
+ ..
+ Xmu
+ ..
+ bitmaps
+ ..
+ extensions
+ ..
+ fonts
+ ..
+ pixmaps
+ ..
+ ..
+ ..
+ info
+ ..
+ lib
+ X11
+ XF86Setup
+ pics
+ ..
+ scripts
+ ..
+ tcllib
+ ..
+ ..
+ app-defaults
+ ..
+ config
+ ..
+ doc
+ ..
+ etc
+ ..
+ fonts
+ 100dpi
+ ..
+ 75dpi
+ ..
+ PEX
+ ..
+ Speedo
+ ..
+ Type1
+ ..
+ cyrillic
+ ..
+ misc
+ ..
+ ..
+ fs
+ ..
+ lbxproxy
+ ..
+ locale
+ C
+ ..
+ en_US.utf
+ ..
+ iso8859-1
+ ..
+ iso8859-2
+ ..
+ iso8859-3
+ ..
+ iso8859-4
+ ..
+ iso8859-5
+ ..
+ iso8859-6
+ ..
+ iso8859-7
+ ..
+ iso8859-8
+ ..
+ iso8859-9
+ ..
+ ja
+ ..
+ ja.JIS
+ ..
+ ja.SJIS
+ ..
+ ko
+ ..
+ koi8-r
+ ..
+ tbl_data
+ ..
+ th_TH.TACTIS
+ ..
+ zh
+ ..
+ zh_TW
+ ..
+ ..
+ proxymngr
+ ..
+ rstart
+ commands
+ x11r6
+ ..
+ ..
+ contexts
+ ..
+ ..
+ twm
+ ..
+ x11perfcomp
+ ..
+ xdm
+ ..
+ xinit
+ ..
+ xkb
+ compat
+ ..
+ compiled
+ ..
+ geometry
+ digital
+ ..
+ sgi
+ ..
+ ..
+ keycodes
+ digital
+ ..
+ sgi
+ ..
+ ..
+ keymap
+ digital
+ ..
+ sgi
+ ..
+ sun
+ ..
+ ..
+ rules
+ ..
+ semantics
+ ..
+ symbols
+ digital
+ ..
+ fujitsu
+ ..
+ nec
+ ..
+ sony
+ ..
+ sun
+ ..
+ ..
+ ..
+ xserver
+ ..
+ xsm
+ ..
+ ..
+ modules
+ ..
+ ..
+ libexec
+ ..
+ man
+ cat1
+ ..
+ cat2
+ ..
+ cat3
+ ..
+ cat4
+ ..
+ cat5
+ ..
+ cat6
+ ..
+ cat7
+ ..
+ cat8
+ ..
+ cat9
+ ..
+ catl
+ ..
+ catn
+ ..
+ ja_JP.EUC
+ cat1
+ ..
+ cat2
+ ..
+ cat3
+ ..
+ cat4
+ ..
+ cat5
+ ..
+ cat6
+ ..
+ cat7
+ ..
+ cat8
+ ..
+ cat9
+ ..
+ catl
+ ..
+ catn
+ ..
+ man1
+ ..
+ man2
+ ..
+ man3
+ ..
+ man4
+ ..
+ man5
+ ..
+ man6
+ ..
+ man7
+ ..
+ man8
+ ..
+ man9
+ ..
+ manl
+ ..
+ mann
+ ..
+ ..
+ man1
+ ..
+ man2
+ ..
+ man3
+ ..
+ man4
+ ..
+ man5
+ ..
+ man6
+ ..
+ man7
+ ..
+ man8
+ ..
+ man9
+ ..
+ manl
+ ..
+ mann
+ ..
+ ..
+ share
+ doc
+ ..
+ examples
+ ..
+ ..
+..
diff -ruN --exclude=CVS /a/anoncvs/netbsd/pkgsrc/mk/bsd.pkg.mk mk/bsd.pkg.mk
--- /a/anoncvs/netbsd/pkgsrc/mk/bsd.pkg.mk Thu Aug 17 01:47:10 2000
+++ mk/bsd.pkg.mk Thu Aug 17 01:41:55 2000
@@ -29,6 +29,10 @@
.elif (${OPSYS} == "Linux")
DEF_UMASK?= 022
NOMANCOMPRESS?= yes
+.elif (${OPSYS} == "HP-UX")
+DEF_UMASK?= 022
+# XXX They use /usr/{bin,lib,man}/X11 et al. What's the right thing here?
+X11BASE?= ${DESTDIR}/usr
.endif
DEF_UMASK?= 0022
@@ -512,7 +516,7 @@
MV?= /usr/bin/mv
PATCH?= ${LOCALBASE}/bin/patch -b
PAX?= /bin/pax
-PKG_TOOLS_BIN?= ${LOCALBASE}/bsd/bin
+PKG_TOOLS_BIN?= ${LOCALBASE}/bsd/bin
RM?= /usr/bin/rm
RMDIR?= /usr/bin/rmdir
SED?= /usr/bin/sed
@@ -555,7 +559,7 @@
MV?= /bin/mv
PATCH?= /usr/bin/patch
PAX?= /usr/local/bsd/bin/pax
-PKG_TOOLS_BIN?= ${LOCALBASE}/bsd/bin
+PKG_TOOLS_BIN?= ${LOCALBASE}/bsd/bin
RM?= /bin/rm
RMDIR?= /bin/rmdir
SED?= /bin/sed
@@ -568,6 +572,51 @@
TR?= /usr/bin/tr
TRUE?= /bin/true
TYPE?= type
+.elif (${OPSYS} == "HP-UX")
+AWK?= /usr/bin/awk
+BASENAME?= /usr/bin/basename
+CAT?= /usr/bin/cat
+CC?= gcc
+CHMOD?= /usr/bin/chmod
+CHOWN?= /usr/bin/chown
+CHGRP?= /usr/bin/chgrp
+CP?= /usr/bin/cp
+CUT?= ${LOCALBASE}/bin/cut
+ECHO?= ${LOCALBASE}/bin/echo
+EGREP?= /usr/bin/egrep
+FALSE?= /usr/bin/false
+FILE?= /usr/bin/file
+FIND?= /usr/bin/find
+GREP?= /usr/bin/grep
+GTAR?= ${LOCALBASE}/bin/tar
+GUNZIP_CMD?= /usr/contrib/bin/gunzip -f
+GZCAT?= /usr/contrib/bin/gzcat
+GZIP?= -9
+GZIP_CMD?= /usr/contrib/bin/gzip -nf ${GZIP}
+HEAD?= /usr/bin/head
+ID?= /usr/bin/id
+IDENT?= /usr/bin/ident
+LDCONFIG?= /usr/bin/true
+LN?= /usr/bin/ln
+MKDIR?= /usr/bin/mkdir -p
+MTREE?= ${LOCALBASE}/bsd/bin/mtree
+MV?= /usr/bin/mv
+PATCH?= ${LOCALBASE}/bin/patch
+PAX?= /usr/bin/pax
+PKG_TOOLS_BIN?= ${LOCALBASE}/bsd/bin
+RM?= /usr/bin/rm
+RMDIR?= /usr/bin/rmdir
+SED?= /usr/bin/sed
+SETENV?= /usr/bin/env
+SH?= /usr/bin/ksh
+SU?= /usr/bin/su
+TAIL?= /usr/bin/tail
+TEST?= /usr/bin/test
+TOUCH?= /usr/bin/touch
+TR?= /usr/bin/tr
+TRUE?= /usr/bin/true
+TYPE?= /usr/bin/type
+UNAME?= ${LOCALASE}/bin/uname
.else
AWK?= /usr/bin/awk
BASENAME?= /usr/bin/basename
@@ -598,7 +647,7 @@
MV?= /bin/mv
PATCH?= /usr/bin/patch
PAX?= /bin/pax
-PKG_TOOLS_BIN?= /usr/sbin
+PKG_TOOLS_BIN?= /usr/sbin
RM?= /bin/rm
RMDIR?= /bin/rmdir
SED?= /usr/bin/sed
@@ -1640,7 +1689,7 @@
fi; \
done; \
fi
-.if ${OPSYS} == "NetBSD" || ${OPSYS} == "SunOS"
+.if ${OPSYS} == "NetBSD" || ${OPSYS} == "SunOS" || ${OPSYS} == "HP-UX"
${_PKG_SILENT}${_PKG_DEBUG} \
sos=`${EGREP} -h -x '.*/lib[^/]+\.so\.[0-9]+(\.[0-9]+)+' ${PLIST} || ${TRUE}`; \
if [ "X$$sos" != "X" ]; then \
@@ -3078,7 +3127,7 @@
-e 's|\(^\([^@/]*/\)*man/\([^/]*/\)\{0,1\}cat[1-9ln]/.*[0-9ln]\)\.gz$$|\1|'
.endif # MANZ
MANZ_NAWK_CMD=
-.elif ${OPSYS} == "SunOS"
+.elif ${OPSYS} == "SunOS" || ${OPSYS} == "HP-UX"
.ifdef USE_IMAKE
IMAKE_MAN_CMD= ${AWK} '/^([^\/]*\/)*man\/([^\/]*\/)?cat[1-9ln]\/.*[0-9ln](\.gz)?$$/ { \
sect = $$0; n = match(sect, "/cat[1-9ln]"); \
@@ -3108,7 +3157,7 @@
{ print $$0; }' |
.endif # MANZ
MANZ_EXPRESSION=
-.endif # SunOS
+.endif # SunOS || HP-UX
plist: ${PLIST}
${PLIST}: ${PLIST_SRC}