> > > -SHARED_LIBS =    rpm             0.1 \
> > > -         rpmbuild        0.0
> > 
> > > +SHARED_LIBS +=   rpmio                     2.0 # 2.0 \
> > > +         rpm                       2.0 # 2.0 \
> > > +         rpmsign                   0.0 # 0.0 \
> > > +         rpmbuild                  2.0 # 2.0
> > 
> > Bump libs which existed previously (rpm and rpmbuild) to 1.0 and those
> > which didn't exist (rpmio and rpmsign) you can start from 0.0. If you
> > want to keep libs rpmio, rpm and rpmbuild in sync like upstream then you
> > can keep them in sync (so set them to 1.0).
> > 
> > Just to be clear, personally I would go for:
> > 
> >     rpm 1.0
> >     rpmbuild 1.0
> >     rpmio 0.0
> >     rpmsign 0.0
> > 
> > As previously mentioned, OpenBSD ports should keep its own versioning of
> > libraries. Major and minor are natular numbers (starting at zero) and go
> > up. Without skipping any numbers.
> 
> Thanks for the explanation.  I've adjusted my patch based on the information
> you've explained.

Hi,

I tried to build this port based on your last diff, I can't build it:

1) Have you tried with Python 2.7? There is hardcoded WANTLIB with 
python2.6

This fails with Python2.7 with a message


===>  rpm-4.9.0 depends on: nss-* - found
===>  rpm-4.9.0 depends on: libiconv-* - found
===>  Verifying specs: bz2 c db lua lzma m magic nspr4 nss3 nssutil3 plc4  
plds4 popt pthread python2.6 util z intl>=5 iconv>=6 bz2 c db lua lzma m 
magic nspr4 nss3 nssutil3 plc4  plds4 popt pthread python2.6 util z 
intl>=5 iconv>=6
Missing library for python2.6>=0.0
Fatal error
*** Error code 1


and then when I correct WANTLIB, by removing the reference to python2.6

checking whether /usr/local/bin/python2.7 version >= 2.6... yes
checking for /usr/local/bin/python2.7 version... 2.7
checking for /usr/local/bin/python2.7 platform... openbsd4
checking for /usr/local/bin/python2.7 script directory... 
${prefix}/lib/python2.7/site-packages
checking for /usr/local/bin/python2.7 extension module directory... 
${exec_prefix}/lib/python2.7/site-packages
checking Python.h usability... yes
checking Python.h presence... yes
checking for Python.h... yes
checking for library containing Py_Main... no
configure: error: missing python library
*** Error code 1



2) after removing all references to python in Makefile, I stumble across 

checking nspr.h usability... no
checking nspr.h presence... no
checking for nspr.h... no
configure: error: missing required NSPR / NSS header
*** Error code 1

Here's the Makefile diffed against current I tested with. You can use 
mail/alpine to send inline diff.

You need to figure out where to put the relevant patches.

Thanks,
amit


Index: Makefile
===================================================================
RCS file: /cvs/ports/misc/rpm/Makefile,v
retrieving revision 1.24
diff -u Makefile
--- Makefile    17 Apr 2011 18:23:19 -0000      1.24
+++ Makefile    4 Jul 2011 22:15:25 -0000
@@ -1,44 +1,81 @@
 # $OpenBSD: Makefile,v 1.24 2011/04/17 18:23:19 jasper Exp $
 
-COMMENT =      redhat package manager
+COMMENT =      linux package manager
 
-DISTNAME =     rpm-3.0.6
-REVISION =     5
-SHARED_LIBS =  rpm             0.1 \
-               rpmbuild        0.0
+DISTNAME =     rpm-4.9.0
+EXTRACT_SUFX = .tar.bz2
 CATEGORIES =   misc archivers emulators
 
+SHARED_LIBS += rpmio                     0.0 # 0.0 \
+               rpm                       1.0 # 1.0 \
+               rpmsign                   0.0 # 0.0 \
+               rpmbuild                  1.0 # 1.0
+
+# GPLv2+
 PERMIT_DISTFILES_FTP = Yes
 PERMIT_DISTFILES_CDROM =       Yes
 PERMIT_PACKAGE_FTP =   Yes
 PERMIT_PACKAGE_CDROM = Yes
 
+MAINTAINER =   David Cantrell <david.l.cantr...@gmail.com>
 
-MAINTAINER =   Marc Espie <es...@openbsd.org>
-
 HOMEPAGE =     http://www.rpm.org/
-MASTER_SITES = 
ftp://ftp.mirrorservice.org/sites/ftp.rpm.org/pub/rpm/dist/rpm-3.0.x/ \
-               ftp://ftp.rpm.org/pub/rpm/dist/rpm-3.0.x/
+MASTER_SITES = http://rpm.org/releases/rpm-4.9.x/
 
+WANTLIB +=     bz2 c db lua lzma m magic nspr4 nss3 nssutil3 plc4 \
+               plds4 popt pthread util z
+#              plds4 popt pthread python2.6 util z
+
 MODULES =      devel/gettext
-WANTLIB +=     bz2 c popt z
-LIB_DEPENDS += archivers/bzip2 \
-               devel/popt
+#MODULES =     devel/gettext \
+#              lang/python
+BUILD_DEPENDS =        devel/autoconf/2.61 \
+               devel/automake/1.10
+RUN_DEPENDS =  security/gnupg
+#LIB_DEPENDS +=        ${MODPY_LIB_DEPENDS} \
+LIB_DEPENDS += archivers/xz \
+               databases/db/v4 \
+               devel/libmagic \
+               devel/popt \
+               lang/lua \
+               security/nss
 
+MAKE_ENV +=    AUTOCONF_VERSION=2.61 \
+               AUTOMAKE_VERSION=1.10
+
+SEPARATE_BUILD =       simple
 USE_LIBTOOL =          Yes
-USE_GROFF =            Yes
 CONFIGURE_STYLE =      gnu
-MODGNU_CONFIG_GUESS_DIRS =     ${WRKSRC} ${WRKSRC}/popt
 
-RPM_INTEL =            RPMS/i386
-SUBST_VARS =           RPM_INTEL
+CONFIGURE_ARGS +=      --localstatedir=/var \
+                       --with-external-db \
+#                      --enable-python \
+                       --with-lua
 
-# Enforce check for pgp, so no build-time depend is needed
-CONFIGURE_ENV =                PGPBIN=$(LOCALBASE)/bin/pgp
-CONFIGURE_ENV +=       CPPFLAGS=-I${LOCALBASE}/include
-CONFIGURE_ENV +=       LDFLAGS="-L${LOCALBASE}/lib -liconv"
-CONFIGURE_ENV +=       varprefix=/var
+RPM_CPPFLAGS =         -I${LOCALBASE}/include \
+                       -I${LOCALBASE}/include/db4 \
+                       -I${LOCALBASE}/include/nspr \
+                       -I${LOCALBASE}/include/nss
+RPM_LDFLAGS =          -L${LOCALBASE}/lib \
+                       -L${LOCALBASE}/lib/db4
+#                      -L${LOCALBASE}/lib/db4 \
+#                      -L${LOCALBASE}/python${MODPY_VERSION}/config
 
-SEPARATE_BUILD =       simple
+CONFIGURE_ENV +=       varprefix=/var \
+#                      PYTHON_VERSION=${MODPY_VERSION} \
+                       GPG=${LOCALBASE}/bin/gpg \
+                       CPPFLAGS="${RPM_CPPFLAGS}" \
+                       LDFLAGS="${RPM_LDFLAGS}"
+
+pre-configure:
+       cd ${WRKSRC} ; \
+       env AUTOCONF_VERSION=2.61 AUTOMAKE_VERSION=1.10 \
+       ${WRKSRC}/autogen.sh --noconfigure
+
+post-install:
+       ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/rpm
+       @for d in CHANGES COPYING CREDITS ChangeLog GROUPS README ; do \
+               ${INSTALL_DATA} ${WRKSRC}/$$d ${PREFIX}/share/doc/rpm/$$d ; \
+       done
 
 .include <bsd.port.mk>

Reply via email to