summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
authoragc <agc@pkgsrc.org>2004-11-05 16:44:46 +0000
committeragc <agc@pkgsrc.org>2004-11-05 16:44:46 +0000
commit302b172acadbad8287a55c546a2a9f9ecb2913d1 (patch)
treefdfc915374f408c8d3b1f4d656a3784f313a2384 /pkgtools
parent7460e8d8d274a5650a57cc8828774bbf8ce8daf7 (diff)
downloadpkgsrc-302b172acadbad8287a55c546a2a9f9ecb2913d1.tar.gz
Bring this package into line with 21st century pkgsrc:
+ ZOULARISBASE is gone - just use PREFIX to find bmake + WRKDIR contains the name of the work directory, so find this out from pkgsrc + remove getcwd() calls, and use WRKDIR to find the place where the various informational files are placed + retain the ability to set the working directory from the command-line, but it is almost useless these days Bump pkg revision to 2.
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/gensolpkg/Makefile8
-rw-r--r--pkgtools/gensolpkg/distinfo4
-rw-r--r--pkgtools/gensolpkg/patches/patch-ac70
3 files changed, 71 insertions, 11 deletions
diff --git a/pkgtools/gensolpkg/Makefile b/pkgtools/gensolpkg/Makefile
index 528b0ced330..4a41c6c87e4 100644
--- a/pkgtools/gensolpkg/Makefile
+++ b/pkgtools/gensolpkg/Makefile
@@ -1,18 +1,18 @@
-# $NetBSD: Makefile,v 1.19 2004/02/06 19:04:25 jlam Exp $
+# $NetBSD: Makefile,v 1.20 2004/11/05 16:44:46 agc Exp $
#
DISTNAME= gensolpkg-1.10
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= pkgtools
MASTER_SITES= ${MASTER_SITE_LOCAL}
-MAINTAINER= veego@NetBSD.org
+MAINTAINER= agc@NetBSD.org
COMMENT= Utility to generate a Solaris package
ONLY_FOR_PLATFORM= SunOS-*-* # uses Solaris pkgmk(1)
MAKE_ENV+= CPPFLAGS="" CC=${CC:Q}
-MAKEFLAGS+= PREFIX=${PREFIX:Q} ZOULARISBASE=${ZOULARISBASE:Q}
+MAKEFLAGS+= PREFIX=${PREFIX:Q}
do-install:
cd ${WRKSRC} && ${MAKE} install PREFIX=${PREFIX}
diff --git a/pkgtools/gensolpkg/distinfo b/pkgtools/gensolpkg/distinfo
index d9242311841..0347fa26790 100644
--- a/pkgtools/gensolpkg/distinfo
+++ b/pkgtools/gensolpkg/distinfo
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.5 2002/12/08 12:54:44 cjep Exp $
+$NetBSD: distinfo,v 1.6 2004/11/05 16:44:46 agc Exp $
SHA1 (gensolpkg-1.10.tar.gz) = d7981f6c2159a1a2304a5e446185ce6b2ade7305
Size (gensolpkg-1.10.tar.gz) = 8430 bytes
SHA1 (patch-aa) = ad9239f3b4a037402b785bf6c37d40208f786ade
SHA1 (patch-ab) = 0ecef672900def2d2f2151943effdaaf16f8e221
-SHA1 (patch-ac) = 70b71296dcd7686f0e066c0f8c7d9ebba7ad91a7
+SHA1 (patch-ac) = 1da06afa9c8128d3334f7251e8e0bc21f7945d72
diff --git a/pkgtools/gensolpkg/patches/patch-ac b/pkgtools/gensolpkg/patches/patch-ac
index 5571273404a..ee86d456065 100644
--- a/pkgtools/gensolpkg/patches/patch-ac
+++ b/pkgtools/gensolpkg/patches/patch-ac
@@ -1,13 +1,73 @@
-$NetBSD: patch-ac,v 1.1 2002/12/08 12:54:46 cjep Exp $
+$NetBSD: patch-ac,v 1.2 2004/11/05 16:44:46 agc Exp $
---- gensolpkg.c.in.orig Sat May 5 14:44:31 2001
-+++ gensolpkg.c.in
-@@ -572,7 +572,7 @@ main(int argc, char **argv)
+--- gensolpkg.c.in.orig Sat May 5 15:44:31 2001
++++ gensolpkg.c.in Fri Nov 5 16:19:24 2004
+@@ -79,7 +79,7 @@
+ static char comment[256 + 1]; /* one line descr of pkg */
+
+ static char prefix[MAXPATHLEN]; /* current prefix */
+-static char *workdir; /* name of working directory */
++static char workdir[MAXPATHLEN]; /* name of working directory */
+ static char *category; /* category of package - default "application" */
+ static int transform; /* transform the package - default "disabled" */
+
+@@ -357,9 +357,9 @@
+ }
+ (void) fprintf(fp, "!PKG=%s\n", pkg);
+ (void) fprintf(fp, "!PREFIX=%s\n", prefix);
+- (void) fprintf(fp, "i pkginfo=%s/%s\n", getcwd(buf, sizeof(buf)), pkginfofile);
+- (void) fprintf(fp, "i version=%s/%s\n", getcwd(buf, sizeof(buf)), versionfile);
+- (void) fprintf(fp, "i depend=%s/%s\n", getcwd(buf, sizeof(buf)), dependfile);
++ (void) fprintf(fp, "i pkginfo=%s\n", pkginfofile);
++ (void) fprintf(fp, "i version=%s\n", versionfile);
++ (void) fprintf(fp, "i depend=%s\n", dependfile);
+ for (linec = 1 ; fgets(buf, sizeof(buf), plist) != (char *) NULL ; linec++) {
+ /* trim leading whitespace from PLIST entries */
+ for (cp = buf ; isspace(*cp) ; cp++) {
+@@ -463,7 +463,7 @@
+ (void) fputc('\n', fp2);
+ }
+ (void) fclose(fp2);
+- (void) fprintf(fp, "i postinstall=%s/%s/.postinstall\n", getcwd(buf, sizeof(buf)), workdir);
++ (void) fprintf(fp, "i postinstall=%s/.postinstall\n", workdir);
+ }
+ if (remove.s_c > 0) {
+ (void) snprintf(f, sizeof(f), "%s/.postremove", workdir);
+@@ -493,7 +493,7 @@
+ (void) fputc('\n', fp2);
+ }
+ (void) fclose(fp2);
+- (void) fprintf(fp, "i postremove=%s/%s/.postremove\n", getcwd(buf, sizeof(buf)), workdir);
++ (void) fprintf(fp, "i postremove=%s/.postremove\n", workdir);
+ }
+ (void) fclose(fp);
+ (void) fclose(plist);
+@@ -572,13 +572,17 @@
int i;
(void) strcpy(prefix, "@PREFIX@");
- (void) strcpy(bmake, "@PREFIX@/bsd/bin/bmake");
-+ (void) strcpy(bmake, "@ZOULARISBASE@/bin/bmake");
++ (void) strcpy(bmake, "@PREFIX@/bin/bmake");
(void) strcpy(output, "/tmp");
(void) strcpy(pkgdir, "@SPOOLDIR@");
transform = 0;
+- workdir = "work";
+ category = "application";
+ pkg = (char *) NULL;
++ (void) snprintf(cmd, sizeof(cmd), "%s show-var VARNAME=WRKDIR", bmake);
++ if (!pipeit(workdir, sizeof(workdir), cmd, "r")) {
++ (void) fprintf(stderr, "Warning: can't find package workdir\n");
++ exit(1);
++ }
+ (void) snprintf(cmd, sizeof(cmd), "%s show-var VARNAME=PREFIX", bmake);
+ if (!pipeit(prefix, sizeof(prefix), cmd, "r")) {
+ (void) fprintf(stderr, "Can't find package prefix\n");
+@@ -633,7 +637,7 @@
+ transform = 1;
+ break;
+ case 'w':
+- workdir = optarg;
++ (void) strnncpy(workdir, sizeof(workdir), optarg, strlen(optarg));
+ break;
+ default:
+ fprintf(stderr, "Usage:\n");