[26411] trunk/dports/sysutils/rpm
source_changes at macosforge.org
source_changes at macosforge.org
Thu Jun 21 17:09:51 PDT 2007
Revision: 26411
http://trac.macosforge.org/projects/macports/changeset/26411
Author: afb at macports.org
Date: 2007-06-21 17:09:50 -0700 (Thu, 21 Jun 2007)
Log Message:
-----------
Update the RPM port so that it actually works
- fix the linking issues with popt/sqlite3
- remove all fixed locations of binaries
- patch minor header issue for C++/APT-RPM
- make removing the %{buildroot} optional!
- move configuration back from /etc/rpm
- move temporaries back from /var/tmp
Modified Paths:
--------------
trunk/dports/sysutils/rpm/Portfile
trunk/dports/sysutils/rpm/files/patch-macros.in
Added Paths:
-----------
trunk/dports/sysutils/rpm/files/patch-configure
trunk/dports/sysutils/rpm/files/patch-parseBuildInstallClean.c
trunk/dports/sysutils/rpm/files/patch-rpmevr.h
Modified: trunk/dports/sysutils/rpm/Portfile
===================================================================
--- trunk/dports/sysutils/rpm/Portfile 2007-06-21 22:40:07 UTC (rev 26410)
+++ trunk/dports/sysutils/rpm/Portfile 2007-06-22 00:09:50 UTC (rev 26411)
@@ -36,13 +36,39 @@
configure.args --disable-nls --without-javaglue --without-included-gettext \
--with-libintl-prefix=${prefix} --with-libiconv-prefix=${prefix} \
--mandir=${prefix}/share/man --infodir=${prefix}/share/info \
- --with-python=2.4
+ --with-python=2.4 --sysconfdir=${prefix}/etc/rpm
+ # needed because it checks for sqlite3_open in sqlite lib...
+configure.env ac_cv_lib_sqlite_sqlite3_open=yes
+patchfiles patch-macros.in \
+ patch-configure \
+ patch-rpmevr.h \
+ patch-parseBuildInstallClean.c
+post-patch {
+ # use external popt library
+ delete ${worksrcpath}/popt
+}
+
+post-destroot {
+ # MacPorts specific changes
+ reinplace "s;%{_usrsrc}/rpm;%{_usrsrc}/macports;" ${destroot}${prefix}/lib/rpm/macros
+
+ xinstall -d -m 755 ${prefix}/etc/rpm
+
+ delete [glob ${destroot}${prefix}/lib/perl5/*/*/perllocal.pod]
+
+ # where the RPM database lives
+ destroot.keepdirs ${destroot}${prefix}/etc/rpm\
+ ${destroot}${prefix}/var/lib/rpm\
+ ${destroot}${prefix}/src/macports/BUILD\
+ ${destroot}${prefix}/src/macports/RPMS\
+ ${destroot}${prefix}/src/macports/SOURCES\
+ ${destroot}${prefix}/src/macports/SPECS\
+ ${destroot}${prefix}/src/macports/SRPMS
+}
+
platform darwin {
- patchfiles-append patch-macros.in \
- patch-popt-Makefile.in
-
pre-configure {
xinstall -d -m 755 ${workpath}/librt
ln -sf /usr/lib/libSystem.B.dylib ${workpath}/librt/librt.dylib
@@ -56,21 +82,8 @@
configure.ldflags-append -L${workpath}/librt
post-destroot {
- # Delete overlapping files.
- delete ${destroot}${prefix}/include/popt.h
- eval delete [glob ${destroot}${prefix}/share/man/man3/popt.3*]
- eval delete [glob ${destroot}${prefix}/lib/libpopt.*]
-
- # MacPorts specific changes
- reinplace "s;%{_usrsrc}/redhat;%{_usrsrc}/macports;" ${destroot}${prefix}/lib/rpm/macros
-
- # where the RPM database lives
- destroot.keepdirs ${destroot}${prefix}/var/lib/rpm\
- ${destroot}${prefix}/src/macports/BUILD\
- ${destroot}${prefix}/src/macports/RPMS\
- ${destroot}${prefix}/src/macports/SOURCES\
- ${destroot}${prefix}/src/macports/SPECS\
- ${destroot}${prefix}/src/macports/SRPMS
+ # MacOSX specific changes
+ reinplace "s;\blibtoolize\b;glibtoolize;" ${destroot}${prefix}/lib/rpm/macros
}
}
Added: trunk/dports/sysutils/rpm/files/patch-configure
===================================================================
--- trunk/dports/sysutils/rpm/files/patch-configure (rev 0)
+++ trunk/dports/sysutils/rpm/files/patch-configure 2007-06-22 00:09:50 UTC (rev 26411)
@@ -0,0 +1,24 @@
+--- configure.orig 2007-06-22 01:21:33.000000000 +0200
++++ configure 2007-06-22 01:23:43.000000000 +0200
+@@ -27309,8 +27309,8 @@
+ if test $ac_cv_lib_popt_poptGetContext = yes; then
+
+ WITH_POPT_SUBDIR=
+- WITH_POPT_INCLUDE=
+- WITH_POPT_LIB="-lpopt"
++ WITH_POPT_INCLUDE='-I${prefix}/include'
++ WITH_POPT_LIB='${prefix}/lib/libpopt.la'
+
+ fi
+
+@@ -27545,8 +27545,8 @@
+ _ACEOF
+
+ WITH_SQLITE3_SUBDIR=
+- WITH_SQLITE3_INCLUDE=
+- WITH_SQLITE3_LIB="-lsqlite"
++ WITH_SQLITE3_INCLUDE='-I${prefix}/include'
++ WITH_SQLITE3_LIB='${prefix}/lib/libsqlite3.la'
+ DBLIBSRCS="$DBLIBSRCS sqlite.c"
+
+ fi
Modified: trunk/dports/sysutils/rpm/files/patch-macros.in
===================================================================
--- trunk/dports/sysutils/rpm/files/patch-macros.in 2007-06-21 22:40:07 UTC (rev 26410)
+++ trunk/dports/sysutils/rpm/files/patch-macros.in 2007-06-22 00:09:50 UTC (rev 26411)
@@ -1,147 +1,5 @@
---- macros.in.orig 2007-05-14 21:46:44.000000000 -0400
-+++ macros.in 2007-06-17 18:21:12.000000000 -0400
-@@ -35,79 +35,79 @@
- #==============================================================================
- # ---- Generally useful path macros.
- #
--%__awk @AWK@
--%__bash @__BASH@
--%__bzip2 @__BZIP2@
--%__cat @__CAT@
--%__chgrp @__CHGRP@
--%__chmod @__CHMOD@
--%__chown @__CHOWN@
--%__cp @__CP@
--%__cpio @__CPIO@
--%__curl @__CURL@
--%__cvs @__CVS@
--%__diff @__DIFF@
--%__ditto @__DITTO@
--%__file @__FILE@
--%__find @__FIND@
--%__gpg @__GPG@
--%__grep @__GREP@
--%__gzip @__GZIP@
-+%__awk @prefix@/bin/gawk
-+%__bash /bin/bash
-+%__bzip2 /usr/bin/bzip2
-+%__cat /bin/cat
-+%__chgrp /usr/bin/chgrp
-+%__chmod /bin/chmod
-+%__chown /usr/sbin/chown
-+%__cp /bin/cp
-+%__cpio @prefix@/bin/cpio
-+%__curl /usr/bin/curl
-+%__cvs /usr/bin/cvs
-+%__diff /usr/bin/diff
-+%__ditto /usr/bin/ditto
-+%__file @prefix@/bin/file
-+%__find /usr/bin/find
-+%__gpg @prefix@/bin/gpg
-+%__grep @prefix@/bin/grep
-+%__gzip @prefix@/bin/gzip
- %__hg @__HG@
--%__id @__ID@
--%__install @__INSTALL@
-+%__id @prefix@/bin/gid
-+%__install @prefix@/bin/ginstall
- %__install_info @__INSTALL_INFO@
- %__ldconfig @__LDCONFIG@
--%__lua @__LUA@
--%__ln_s @LN_S@
--%__lzma @__LZMA@
--%__lzmash @__LZMASH@
--%__lzop @__LZOP@
--%__make @__MAKE@
-+%__lua @prefix@/bin/lua
-+%__ln_s /bin/ln
-+%__lzma @prefix@/bin/lzma
-+%__lzmash @prefix@/bin/lzmash
-+%__lzop @prefix@/bin/lzop
-+%__make @prefix@/bin/gmake
- %make %{__make}
--%__mkdir @__MKDIR@
--%__mkdir_p @MKDIR_P@
--%__mv @__MV@
--%__patch @__PATCH@
--%__pax @__PAX@
--%__perl @__PERL@
--%__pgp @__PGP@
--%__php @__PHP@
--%__python @__PYTHON@
--%__rm @__RM@
--%__rsh @__RSH@
--%__sed @__SED@
--%__sh @__SH@
--%__ssh @__SSH@
--%__svn @__SVN@
--%__tar @__TAR@
--%__tclsh @__TCLSH@
--%__unzip @__UNZIP@
--%__wget @__WGET@
--%__xar @__XAR@
-+%__mkdir /bin/mkdir
-+%__mkdir_p %{__mkdir} -p
-+%__mv /bin/mv
-+%__patch @prefix@/bin/gpatch
-+%__pax @prefix@/bin/pax
-+%__perl @prefix@/bin/perl
-+%__pgp @prefix@/bin/pgp
-+%__php @prefix@/bin/php
-+%__python @prefix@/bin/python
-+%__rm /bin/rm
-+%__rsh /usr/bin/rsh
-+%__sed /usr/bin/sed
-+%__sh /bin/sh
-+%__ssh /usr/bin/ssh
-+%__svn @prefix@/bin/svn
-+%__tar @prefix@/bin/gnutar
-+%__tclsh /usr/bin/tclsh
-+%__unzip /usr/bin/unzip
-+%__wget @prefix@/bin/wget
-+%__xar @prefix@/bin/xar
-
- #==============================================================================
- # ---- Build system path macros.
- #
--%__ar @AR@
--%__as @AS@
--%__cc @CC@
--%__cpp @CPP@
--%__cxx @CXX@
--%__ld @__LD@
--%__nm @__NM@
--%__objcopy @__OBJCOPY@
--%__objdump @__OBJDUMP@
--%__ranlib @RANLIB@
-+%__ar /usr/bin/ar
-+%__as /usr/bin/as
-+%__cc /usr/bin/cc
-+%__cpp /usr/bin/cpp
-+%__cxx /usr/bin/c++
-+%__ld /usr/bin/ld
-+%__nm /usr/bin/nm
-+%__objcopy @prefix@/bin/gobjcopy
-+%__objdump @prefix@/bin/gobjdump
-+%__ranlib /usr/bin/ranlib
- %__remsh %{__rsh}
--%__strip @__STRIP@
-+%__strip /usr/bin/strip
-
- # XXX avoid failures if tools are not installed when rpm is built.
--%__libtoolize libtoolize
--%__aclocal aclocal
--%__autoheader autoheader
--%__automake automake
--%__autoconf autoconf
-+%__libtoolize @prefix@/bin/glibtoolize
-+%__aclocal @prefix@/bin/aclocal
-+%__autoheader @prefix@/bin/autoheader
-+%__automake @prefix@/bin/automake
-+%__autoconf @prefix@/bin/autoconf
-
- #==============================================================================
- # Conditional build stuff.
+--- macros.in.orig 2007-05-15 03:46:44.000000000 +0200
++++ macros.in 2007-06-21 23:16:30.000000000 +0200
@@ -178,7 +178,7 @@
%_dbpath_rebuild %{_dbpath}
@@ -151,20 +9,6 @@
# shadow tree.
%__debug_install_post \
%{_usrlibrpm}/find-debuginfo.sh %{_builddir}/%{?buildsubdir}\
-@@ -231,11 +231,11 @@
- %_srcrpmdir %{_topdir}/SRPMS
-
- # Directory where temporaray files can be created.
--%_tmppath %{_var}/tmp
-+%_tmppath /var/tmp
- %tmpdir %{_tmppath}
-
- # Path to top of build area.
--%_topdir %{_usrsrc}/rpm
-+%_topdir %{_usrsrc}/apple
-
- #==============================================================================
- # ---- Optional rpmrc macros.
@@ -297,7 +297,7 @@
# The PATH put into the environment before running %pre/%post et al.
@@ -183,7 +27,11 @@
%_dbi_config_Dirnames %{_dbi_btconfig}
%_dbi_config_Requireversion %{_dbi_btconfig}
-@@ -662,8 +662,8 @@
+@@ -659,11 +658,12 @@
+ # XXX legacy configuration.
+ # Choose db interface:
+ # 3 native db3 interface.
++# 4 new sqlite3 interface.
#
# There are two macros so that --rebuilddb can convert db1 -> db3.
#
Added: trunk/dports/sysutils/rpm/files/patch-parseBuildInstallClean.c
===================================================================
--- trunk/dports/sysutils/rpm/files/patch-parseBuildInstallClean.c (rev 0)
+++ trunk/dports/sysutils/rpm/files/patch-parseBuildInstallClean.c 2007-06-22 00:09:50 UTC (rev 26411)
@@ -0,0 +1,11 @@
+--- build/parseBuildInstallClean.c.orig 2007-03-21 12:29:49.000000000 +0100
++++ build/parseBuildInstallClean.c 2007-06-19 16:54:45.000000000 +0200
+@@ -47,7 +47,7 @@
+ appendStringBuf(*sbp, s);
+ s = _free(s);
+ } else if (parsePart == PART_CLEAN) {
+- const char * s = rpmExpand("%{?buildroot:rm -rf '%{buildroot}'\n}", NULL);
++ const char * s = rpmExpand("%{?__spec_clean_body}%{!?__spec_clean_body:%{?buildroot:rm -rf '%{buildroot}'\n}}", NULL);
+ if (s && *s)
+ appendStringBuf(*sbp, s);
+ s = _free(s);
Property changes on: trunk/dports/sysutils/rpm/files/patch-parseBuildInstallClean.c
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/dports/sysutils/rpm/files/patch-rpmevr.h
===================================================================
--- trunk/dports/sysutils/rpm/files/patch-rpmevr.h (rev 0)
+++ trunk/dports/sysutils/rpm/files/patch-rpmevr.h 2007-06-22 00:09:50 UTC (rev 26411)
@@ -0,0 +1,21 @@
+--- ./lib/rpmevr.h.orig 2007-05-16 12:55:05.000000000 +0200
++++ ./lib/rpmevr.h 2007-06-20 10:13:14.000000000 +0200
+@@ -18,8 +18,6 @@
+ /**
+ * Dependency Attributes.
+ */
+-typedef enum evrFlags_e rpmsenseFlags;
+-typedef enum evrFlags_e evrFlags;
+
+ /*@-matchfields@*/
+ enum evrFlags_e {
+@@ -67,6 +65,9 @@
+ };
+ /*@=matchfields@*/
+
++typedef enum evrFlags_e rpmsenseFlags;
++typedef enum evrFlags_e evrFlags;
++
+ #define RPMSENSE_SENSEMASK 0x0e /* Mask to get senses, ie serial, */
+ /* less, greater, equal. */
+ #define RPMSENSE_NOTEQUAL (RPMSENSE_EQUAL ^ RPMSENSE_SENSEMASK)
Property changes on: trunk/dports/sysutils/rpm/files/patch-rpmevr.h
___________________________________________________________________
Name: svn:eol-style
+ native
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070621/911cbf3d/attachment.html
More information about the macports-changes
mailing list