Subject: Need pkg-debug hint
To: None <tech-pkg@NetBSD.org>
From: Martin Husemann <martin@duskware.de>
List: tech-pkg
Date: 02/12/2006 00:03:59
--cNdxnHkX5QqsyA0e
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
I'm trying to make the sysutils/nvnet module work on amd64 machines
(nvidia provides both i386 and amd64 binaries).
The attached patch does that and works (as far as the pkg goes - the module
does not yet work for me, but that's not pkgsrc related). Only problem:
since DISTNAME varies depending on arch, make distinfo does not work and
I have to manually adjust the result.
Joerg suggested the trick I did in the attached Makefile (i.e. have
DISTNAME collect all arch depended files if the target is makedistinfo) - but
it just does not work.
Any ideas why?
Thanks,
Martin
--cNdxnHkX5QqsyA0e
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=patch
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/nvnet/Makefile,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 Makefile
--- Makefile 9 Jan 2006 12:44:15 -0000 1.1.1.1
+++ Makefile 11 Feb 2006 22:56:23 -0000
@@ -2,9 +2,16 @@
#
PKGNAME= nvnet-20050620nb1
-DISTNAME= nvnet-netbsd-src-20050620.tgz
-DISTNAME+= NFORCE-Linux-x86-1.0-0310-pkg1.run
CATEGORIES= sysutils
+DISTNAME= nvnet-netbsd-src-20050620.tgz
+.if target(makedistinfo) || (${MACHINE_ARCH} == "i386")
+DISTARCH+= NFORCE-Linux-x86-1.0-0310-pkg1.run
+DISTNAME+= ${DISTARCH}
+.endif
+.if target(makedistinfo) || (${MACHINE_ARCH} == "x86_64")
+DISTARCH+= NFORCE-Linux-x86_64-1.0-0310-pkg1.run
+DISTNAME+= ${DISTARCH}
+.endif
MASTER_SITES+= http://www.morgart.com/NetBSD/nVidia/nvnet/
MASTER_SITES+= http://download.nvidia.com/XFree86/nforce/1.0-0310/
@@ -25,7 +32,7 @@
WRKSRC= ${WRKDIR}/nvnet
-ONLY_FOR_PLATFORM= NetBSD-*-i386
+ONLY_FOR_PLATFORM= NetBSD-*-i386 NetBSD-*-x86_64
INSTALLATION_DIRS= lkm man/man4
@@ -33,7 +40,7 @@
do-extract:
${TAR} -xzf ${DISTDIR}/nvnet-netbsd-src-20050620.tgz -C ${WRKDIR}
- cd ${WRKDIR} && ${SH} ${DISTDIR}/NFORCE-Linux-x86-1.0-0310-pkg1.run -x
+ cd ${WRKDIR} && ${SH} ${DISTDIR}/${DISTARCH} -x
do-install:
${INSTALL} -c -m 755 ${WRKSRC}/module/nv.o ${PREFIX}/lkm/nv.o
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/nvnet/distinfo,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 distinfo
--- distinfo 9 Jan 2006 12:44:15 -0000 1.1.1.1
+++ distinfo 11 Feb 2006 22:56:23 -0000
@@ -6,8 +6,11 @@
SHA1 (NFORCE-Linux-x86-1.0-0310-pkg1.run) = d99f0f7f3a100833a8f1f81073c4edc35b9c400e
RMD160 (NFORCE-Linux-x86-1.0-0310-pkg1.run) = 9fc1a7503876ba5a90fb062ec17c9411d7841fcb
Size (NFORCE-Linux-x86-1.0-0310-pkg1.run) = 6031508 bytes
-SHA1 (patch-aa) = 0a4df7a2f84347cc14eb2ccda649b9685e8f7d03
-SHA1 (patch-ab) = e926aebb2a7307b9eeebfdcd4034ec95a514708c
+SHA1 (NFORCE-Linux-x86_64-1.0-0310-pkg1.run) = 1e3a0a433457ebe61eb203ac8dc5b411d8a6e2c5
+RMD160 (NFORCE-Linux-x86_64-1.0-0310-pkg1.run) = b812fe26be434ccde4d4d0a818b4df7312f7189a
+Size (NFORCE-Linux-x86_64-1.0-0310-pkg1.run) = 3469347 bytes
+SHA1 (patch-aa) = c5c44a728b0f0252869cf8cfcdfb3afa805b6928
+SHA1 (patch-ab) = d786512d547ca4b379af18414c4dcf8417a996fd
SHA1 (patch-ac) = 8a79c254d1145aaa5c628170ce61a5826d0c239a
SHA1 (patch-ad) = 60ebc00fc100f0a1a6615b4af9aa7bed5c3d2fb4
SHA1 (patch-ae) = 5d1111d465f9949f4410d724c073d534c260bcf7
Index: patches/patch-aa
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/nvnet/patches/patch-aa,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 patch-aa
--- patches/patch-aa 9 Jan 2006 12:44:15 -0000 1.1.1.1
+++ patches/patch-aa 11 Feb 2006 22:56:23 -0000
@@ -1,13 +1,16 @@
$NetBSD: patch-aa,v 1.1.1.1 2006/01/09 12:44:15 manu Exp $
---- Makefile.orig 2005-06-21 02:18:41.000000000 +0000
-+++ Makefile 2006-01-05 11:25:04.000000000 +0000
-@@ -3,9 +3,9 @@
- # doc directory is not being made ...
+--- Makefile.orig 2005-06-21 04:18:41.000000000 +0200
++++ Makefile 2006-02-11 23:33:57.000000000 +0100
+@@ -4,7 +4,11 @@
.include <Makefile.inc>
-NFORCE=../nforce
++.if ${MACHINE_ARCH} == "i386"
+NFORCE=../NFORCE-Linux-x86-1.0-0310-pkg1
++.elif ${MACHINE_ARCH} == "x86_64"
++NFORCE=../NFORCE-Linux-x86_64-1.0-0310-pkg1
++.endif
.if ${OSTYPE} == "NetBSD"
.if ${OSVERSION} < 299000000
Index: patches/patch-ab
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/nvnet/patches/patch-ab,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 patch-ab
--- patches/patch-ab 9 Jan 2006 12:44:15 -0000 1.1.1.1
+++ patches/patch-ab 11 Feb 2006 22:56:23 -0000
@@ -1,11 +1,15 @@
$NetBSD: patch-ab,v 1.1.1.1 2006/01/09 12:44:15 manu Exp $
---- module/Makefile.orig 2005-06-21 02:18:41.000000000 +0000
-+++ module/Makefile 2006-01-05 11:25:11.000000000 +0000
-@@ -1,6 +1,6 @@
+--- module/Makefile.orig 2005-06-21 04:18:41.000000000 +0200
++++ module/Makefile 2006-02-11 23:42:01.000000000 +0100
+@@ -1,5 +1,10 @@
-NFORCE=../nforce
++.if ${MACHINE_ARCH} == "i386"
+NFORCE=../NFORCE-Linux-x86-1.0-0310-pkg1
++.elif ${MACHINE_ARCH} == "x86_64"
++NFORCE=../NFORCE-Linux-x86_64-1.0-0310-pkg1
++.endif
++
NV_ROOT= ${.CURDIR}/..
NVIDIA_ROOT= ${.CURDIR}/../${NFORCE}
NVOBJ= ${NVIDIA_ROOT}/nvnet/nvenetlib.o
- CFLAGS+= -I${NVIDIA_ROOT}/nvnet
--cNdxnHkX5QqsyA0e--