Subject: Re: Updated Wine pkgsrc entry (finally) available
To: Bang Jun-Young <>
From: Johnny Lam <>
List: tech-pkg
Date: 01/31/2002 06:23:36
Content-Type: text/plain; charset=us-ascii

On Thu, Jan 31, 2002 at 05:36:47PM +0900, Bang Jun-Young wrote:
> [CC'ed to tech-pkg from now on.]
> On Wed, Jan 30, 2002 at 03:14:06PM -0800, Johnny C. Lam wrote:
> > I'll take a look at this package and see if I can untangle the X11 problem.
> > I'm sort of the xpkgwedge expert.  I have some questions, though, on the
> > package in wine-new-20020131.tar.gz:
> > 
> >      1) What's the purpose of setting LD_RUN_PATH?
> Win32 binaries and Wine dlls can't find other dlls without it. It's a
> dirty hack, yet it works.

I've modified the package to set the rpath for the dlls to
/usr/X11R6/lib:/usr/pkg/lib, so hopefully, setting LD_RUN_PATH will be

> >      2) Is wine supposed to be installed under /usr/X11R6?  You currently
> > 	have USE_X11BASE set in the Makefile, but it wasn't that way before.
> Yes, it requires X to run. I don't understand why USE_X11BASE is
> necessary, but it simply didn't install/work without it.

I've fixed this package to install properly in ${LOCALBASE} (/usr/pkg)

> > 
> >      3) In patch-aa, you explicitly add "-lc" to LIBS.  Why is this
> > 	necessary?  I'd like to insert a comment to simplify future
> > 	maintenance.
> This is a kind of dirty hack, too. And the same reason as above
> ("not work without it").

ISTR that I needed this in PostgreSQL as well, though I forget the
technical reason why.

> >      4) Will this package really work with NetBSD-1.5?  Or only with NetBSD
> > 	releases starting with 1.5.3?
> It will install. However, if it works is a different problem. I'm 
> not sure if it works on 1.5.x since I don't have a 1.5.x machine to
> test with. One certain thing is that Wine won't be able to run most of
> popular Win32 apps on 1.5.x due to lack of clone(2) support and its
> inherent instability. Surely it has a lot of design problems not
> easily addressable, unlike our most-cleanly-designed OS. ;-)
> > wiz: If you're already working on this package, please let me know so that
> >      we don't duplicate efforts.
> A new one will be made available shortly.

I've fixed the build and install problems with the wine-new-20020131
package.  My diffs are attached below.  I'm also in the process of writing
a wine.inst script, to be installed in ${PREFIX}/bin, that does the
per-user post-install setup in ${WRKSRC}/tools/wineinstall.  I'm trying to
figure out how to properly set up wine so I can test the package and see if
my changes are correct.


	-- Johnny Lam <>

Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="wine.diff"

diff -ur wine-new.orig/Makefile wine-new/Makefile
--- wine-new.orig/Makefile	Wed Jan 30 10:21:31 2002
+++ wine-new/Makefile	Thu Jan 31 04:06:54 2002
@@ -12,21 +12,38 @@
 ONLY_FOR_PLATFORM=	NetBSD-1.[5-9]*-i386
-CONFIGURE_ARGS=		--without-curses --x-libraries=${X11BASE}/lib \
-			--prefix=${X11BASE}
+CONFIGURE_ARGS+=	--without-curses
-	${INSTALL_DATA} ${WRKSRC}/documentation/samples/config \
-		${PREFIX}/etc/wine.conf.example
+# The Wine configure script has problems locating the freetype-config
+# script and the libraries in the buildlink directory, so explicitly
+# set the location of freetype-config and prepend all of the LDFLAGS
+# necessary to link against the libraries.
 .include "../../mk/"
-.include "../../graphics/freetype2/"
+.if defined(USE_CUPS) && (${USE_CUPS} == YES)
+.include "../../print/cups/"
+EGDIR=			${PREFIX}/share/examples/wine
+	cd ${WRKSRC}/documentation/samples;				\
+	${INSTALL_DATA} config ${EGDIR}/wine.conf;			\
+	${INSTALL_DATA} generic.ppd ${EGDIR}/generic.ppd;		\
+	${INSTALL_DATA} system.ini ${EGDIR}/system.ini
 .include "../../graphics/Mesa/"
+.include "../../graphics/freetype2/"
+.include "../../graphics/jpeg/"
 .include "../../mk/"
 .include "../../mk/"
diff -ur wine-new.orig/PLIST wine-new/PLIST
--- wine-new.orig/PLIST	Mon Jan 28 01:43:39 2002
+++ wine-new/PLIST	Thu Jan 31 04:04:14 2002
@@ -15,7 +15,6 @@
@@ -347,6 +346,10 @@
+@dirrm share/examples/wine
 @dirrm include/wine/wine
 @dirrm include/wine/msvcrt/sys
 @dirrm include/wine/msvcrt
Only in wine-new: work