Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Apr 1998 17:54:35 -0700
From:      Josh MacDonald <jmacd@paris.CS.Berkeley.EDU>
To:        "Vanill I. Shu" <vanilla@MinJe.com.TW>
Cc:        freebsd-ports@FreeBSD.ORG
Subject:   Re: xdelta port
Message-ID:  <19980429175435.39819@paris.CS.Berkeley.EDU>
In-Reply-To: <19980430035209.01995@MinJe.com.TW>; from Vanill I. Shu on Thu, Apr 30, 1998 at 03:52:09AM %2B0800
References:  <19980430035209.01995@MinJe.com.TW>

next in thread | previous in thread | raw e-mail | index | archive | help
I really think this is a shortcoming in the FreeBSD ports architecture.

There are two options:

1. I patch the main distrbution to automatically include ${PREFIX}/include
and ${PREFIX}/lib in the compile and link flags.

2. We patch only the FreeBSD port to do it.

#1 is unacceptable.  That's what the environment variables CFLAGS and LDFLAGS
are for.  #2 is more acceptable to me, but certainly unclean.

In the port's Makefile we've declared that xdelta depends on gdbm.  This
is only a problem on FreeBSD because for some reason (perhaps others 
find it equally unacceptable, that's fine with me), gcc doesn't automatically
search the local prefix (/usr/local, in this case).  Since gcc isn't
automatically searching this prefix, and the ports mechanism knows that 
xdelta depends on gdbm, it should insert the proper LDFLAGS and CFLAGS
before building.  Your patch doesn't work if I install a gdbm package in
prefix A and then build xdelta with prefix B.  I was always under the
impression that the packages mechanism was designed to work with arbitrary
prefixes.  Since the package manager records the location of gdbm on 
installation, it can retrieve this information and provide the right
linker flags.

Also, version 0.19 is functionally equivalent to 0.18, I only released
it to solve build problems on Windows and AIX, so we should focus on getting
the current port to everyone's satisfaction before rushing off to import
the newest version.

Finally, the version number in the Makefile kept the same shared library 
version number (0.18) because the it is compatible with the previous
release, so there's no need to change it.  The program still builds
thinking its version 0.19.

So no, I don't like your patch, sorry.  :)

-josh

Quoting Vanill I. Shu (vanilla@MinJe.com.TW):
> yes..
> 
> here is my patch. could you review?..
> and on your xdelta-0.19, you forgot bump version on Makefile.am(in)
> 
> diff -ruN xdelta.orig/Makefile xdelta/Makefile
> --- xdelta.orig/Makefile	Thu Apr 23 23:55:15 1998
> +++ xdelta/Makefile	Thu Apr 30 03:36:35 1998
> @@ -1,12 +1,12 @@
>  # New ports collection makefile for:    xdelta
> -# Version required:     0.18
> +# Version required:     0.19
>  # Date created:         Sun May  4 21:40:06 CDT 1997
>  # Whom:                 jmacd
>  #
>  # $Id: Makefile,v 1.7 1998/04/23 07:08:10 jmacd Exp $
>  #
>  
> -DISTNAME=       xdelta-0.18
> +DISTNAME=       xdelta-0.19
>  CATEGORIES=     misc
>  MASTER_SITES=   ftp://ftp.xcf.berkeley.edu/pub/jmacd/
>  
> @@ -15,9 +15,13 @@
>  BUILD_DEPENDS=	${PREFIX}/lib/libgdbm.a:${PORTSDIR}/databases/gdbm
>  
>  GNU_CONFIGURE=	yup
> +CONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/include -I${X11BASE}/include" \
> +		LIBS="-L${LOCALBASE}/lib -L${X11BASE}/lib" \
> +		INSTALL="/usr/bin/install -c"
> +
>  #
>  # this seems to be necessary for libtool :(
> -MAKE_ENV= CC=cc
> +MAKE_ENV=	CC=cc
>  MAN1=           xdelta.1
>  
>  .include <bsd.port.mk>
> diff -ruN xdelta.orig/files/md5 xdelta/files/md5
> --- xdelta.orig/files/md5	Sun Apr 26 03:46:22 1998
> +++ xdelta/files/md5	Thu Apr 30 03:35:27 1998
> @@ -1 +1 @@
> -MD5 (xdelta-0.18.tar.gz) = e377988fc26f78c0cc60f31c3776d602
> +MD5 (xdelta-0.19.tar.gz) = fa415201d5fca8c0a0c1bf55012614ca
> diff -ruN xdelta.orig/patches/patch-aa xdelta/patches/patch-aa
> --- xdelta.orig/patches/patch-aa	Thu Jan  1 08:00:00 1970
> +++ xdelta/patches/patch-aa	Thu Apr 30 03:41:43 1998
> @@ -0,0 +1,11 @@
> +--- Makefile.in.orig	Thu Apr 30 03:40:35 1998
> ++++ Makefile.in	Thu Apr 30 03:40:49 1998
> +@@ -103,7 +103,7 @@
> + 			fakeglib.c \
> + 			partime.c
> + 
> +-libxdelta_la_LDFLAGS = -version-info 0:18.0
> ++libxdelta_la_LDFLAGS = -version-info 0:19.0
> + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
> + mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
> + CONFIG_HEADER = xdeltaconfig.h
> diff -ruN xdelta.orig/pkg/PLIST xdelta/pkg/PLIST
> --- xdelta.orig/pkg/PLIST	Thu Apr 23 23:55:15 1998
> +++ xdelta/pkg/PLIST	Thu Apr 30 03:44:16 1998
> @@ -1,8 +1,9 @@
>  bin/xdelta
> +include/fakeglib.h
>  include/xdelta.h
>  include/xdeltaconfig.h
> -include/fakeglib.h
> -lib/libxdelta.so.0.18.0
> -lib/libxdelta.la
>  lib/libxdelta.a
> +lib/libxdelta.la
> +lib/libxdelta.so
> +lib/libxdelta.so.0.19.0
>  man/man1/xdelta.1.gz
> -- 
> 
> 	Even my heart has broken into pieces just for your sake,
> 	I will be always waiting for you here with no regret.
> 
> 	其實,
> 		愛一個人, 只是一種自我完成的堅持而已...
> 
> 			Vanilla I. Shu \ 徐三泰
> 			vanilla@FreeBSD.ORG \ http://MinJe.com.TW/~vanilla

-- 
-josh

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980429175435.39819>