summaryrefslogtreecommitdiff
blob: 8812a7b0aee0f5841771c7031f8da6eb75eed896 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
Try and disable over-engineering in the rpm build system.

--- rpm-4.4.7/build/Makefile.am
+++ rpm-4.4.7/build/Makefile.am
@@ -24,10 +24,7 @@
 pkginc_HEADERS = rpmbuild.h rpmfc.h rpmfile.h rpmspec.h
 noinst_HEADERS = buildio.h
 
-LDFLAGS = -L$(RPM_BUILD_ROOT)$(usrlibdir) -L$(DESTDIR)$(usrlibdir)
-
-usrlibdir = $(libdir)@MARK64@
-usrlib_LTLIBRARIES = librpmbuild.la
+lib_LTLIBRARIES = librpmbuild.la
 librpmbuild_la_SOURCES = \
 	build.c expression.c files.c misc.c names.c pack.c \
 	parseBuildInstallClean.c parseChangelog.c parseDescription.c \
--- rpm-4.4.7/configure.ac
+++ rpm-4.4.7/configure.ac
@@ -117,7 +117,9 @@
 dnl
 with_selinuxval=no
 AC_MSG_CHECKING(flag used by libtool to link rpm)
-if test X"$GCC" = Xyes ; then
+# We do not want static linking
+#if test X"$GCC" = Xyes ; then
+if false ; then
 	case "$target" in
 		*-*-linux*)	LDFLAGS_STATIC="-all-static"
 				with_selinuxval=yes ;;
@@ -160,14 +162,15 @@
 dnl XXX Test for libpthread.a that is NPTL aware (static link only).
 dnl
 LDFLAGS_NPTL=
-if test -f /usr/lib/nptl/libpthread.a ; then
-    LDFLAGS_NPTL="-L/usr/lib/nptl"
+# Also do not need static linking
+#if test -f /usr/lib/nptl/libpthread.a ; then
+#    LDFLAGS_NPTL="-L/usr/lib/nptl"
 #    INCPATH="$INCPATH -I/usr/include/nptl"
-fi
-if test -f /usr/lib64/nptl/libpthread.a ; then
-    LDFLAGS_NPTL="-L/usr/lib64/nptl"
+#fi
+#if test -f /usr/lib64/nptl/libpthread.a ; then
+#    LDFLAGS_NPTL="-L/usr/lib64/nptl"
 #    INCPATH="$INCPATH -I/usr/include/nptl"
-fi
+#fi
 AC_SUBST(LDFLAGS_NPTL)
 
 dnl
@@ -1306,6 +1309,8 @@
 case "${target_cpu}" in
 x86_64*|ppc64*|powerpc64*|sparc64*|s390x*)	MARK64=64 ;;
 esac
+# We don't want this magic as portage handles it
+MARK64=ALL-SCREWED-UP
 AC_SUBST(MARK64)
 
 # For some systems we know that we have ld_version scripts.
@@ -1388,13 +1384,16 @@
 else
     usrprefix=$prefix
 fi
+
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
 LOCALEDIR="`echo ${usrprefix}/share/locale`"
 AC_DEFINE_UNQUOTED(LOCALEDIR, "$LOCALEDIR",
 	[Full path to rpm locale directory (usually /usr/share/locale)])
 AC_SUBST(LOCALEDIR)
 LIBDIR="`echo $libdir | sed 's-/lib$-/%{_lib}-'`"
 AC_SUBST(LIBDIR)
-RPMCONFIGDIR="`echo ${usrprefix}/lib/rpm`"
+RPMCONFIGDIR="`eval echo ${libdir}/rpm`"
 AC_DEFINE_UNQUOTED(RPMCONFIGDIR, "$RPMCONFIGDIR",
 	[Full path to rpm global configuration directory (usually /usr/lib/rpm)])
 AC_SUBST(RPMCONFIGDIR)
--- rpm-4.4.7/lib/Makefile.am
+++ rpm-4.4.7/lib/Makefile.am
@@ -29,10 +29,7 @@
 mylibs = librpm.la
 LIBS =
 
-LDFLAGS = -L$(RPM_BUILD_ROOT)$(usrlibdir) -L$(DESTDIR)$(usrlibdir)
-
-usrlibdir = $(libdir)@MARK64@
-usrlib_LTLIBRARIES = librpm.la
+lib_LTLIBRARIES = librpm.la
 librpm_la_SOURCES = \
 	cpio.c depends.c formats.c fs.c fsm.c getdate.c \
 	manifest.c misc.c package.c \
--- rpm-4.4.7/python/Makefile.am
+++ rpm-4.4.7/python/Makefile.am
@@ -4,8 +4,8 @@
 
 LINT = splint
 
-pylibdir = ${prefix}/lib@MARK64@/python@WITH_PYTHON_VERSION@
-pyincdir = $(prefix)/include/python@WITH_PYTHON_VERSION@
+pylibdir = $(libdir)/python@WITH_PYTHON_VERSION@
+pyincdir = $(includedir)/python@WITH_PYTHON_VERSION@
 
 SUBDIRS = rpm
 
--- rpm-4.4.7/python/rpm/Makefile.am
+++ rpm-4.4.7/python/rpm/Makefile.am
@@ -4,8 +4,8 @@
 
 PYVER = @WITH_PYTHON_VERSION@
 
-pylibdir = ${prefix}/lib@MARK64@/python@WITH_PYTHON_VERSION@
-pyincdir = $(prefix)/include/python@WITH_PYTHON_VERSION@
+pylibdir = $(libdir)/python@WITH_PYTHON_VERSION@
+pyincdir = $(includedir)/python@WITH_PYTHON_VERSION@
 
 EXTRA_DIST = \
 	__init__.py
--- rpm-4.4.7/rpmdb/Makefile.am
+++ rpm-4.4.7/rpmdb/Makefile.am
@@ -41,11 +41,7 @@
 # XXX watchout, ../db3/libdb.la created by this Makefile may surprise
 libdb_la = $(top_builddir)/$(WITH_DB_SUBDIR)/libdb.la
 
-# XXX grrr, RPM_BUILD_ROOT prevents build pollution if/when -lrpm different
-LDFLAGS = -L$(RPM_BUILD_ROOT)$(usrlibdir) -L$(DESTDIR)$(usrlibdir)
-
-usrlibdir = $(libdir)@MARK64@
-usrlib_LTLIBRARIES = librpmdb.la
+lib_LTLIBRARIES = librpmdb.la
 librpmdb_la_SOURCES = \
 	dbconfig.c fprint.c \
 	hdrNVR.c header.c header_internal.c legacy.c merge.c \
--- rpm-4.4.7/rpmio/Makefile.am
+++ rpm-4.4.7/rpmio/Makefile.am
@@ -28,10 +28,7 @@
 
 BEECRYPTLOBJS = $(shell test X"@WITH_BEECRYPT_SUBDIR@" != X && cat $(top_builddir)/@WITH_BEECTYPT_SUBDIR@/listobjs)
 
-LDFLAGS = -L$(RPM_BUILD_ROOT)$(usrlibdir) -L$(DESTDIR)$(usrlibdir)
-
-usrlibdir = $(libdir)@MARK64@
-usrlib_LTLIBRARIES = librpmio.la
+lib_LTLIBRARIES = librpmio.la
 librpmio_la_SOURCES = \
 	argv.c digest.c fts.c macro.c md2.c md4.c rmd128.c rmd160.c tiger.c \
 	rpmdav.c rpmhook.c rpmio.c rpmlog.c rpmlua.c rpmmalloc.c \
--- rpm-4.4.7/scripts/Makefile.am
+++ rpm-4.4.7/scripts/Makefile.am
@@ -24,7 +24,7 @@
 
 all:
 
-configdir = ${prefix}/lib/rpm
+configdir = $(libdir)/rpm
 config_SCRIPTS = \
 	brp-compress brp-python-bytecompile brp-java-gcjcompile brp-redhat \
 	brp-strip brp-strip-comment-note brp-nobuildrootpath \
--- rpm-4.4.7/tools/Makefile.am
+++ rpm-4.4.7/tools/Makefile.am
@@ -54,10 +54,6 @@
 #rpmdeps_LDFLAGS =	$(staticLDFLAGS)
 rpmdeps_LDADD =		$(top_builddir)/build/librpmbuild.la
 
-rpmfile.c: $(top_srcdir)/file/src/file.c
-	rm -f $@
-	ln -s $< $@
-
 rpmfile_SOURCES =	rpmfile.c
 rpmfile_CFLAGS =	-DMAGIC='"$(MAGIC)"' $(INCLUDES)
 rpmfile_LDADD =		$(top_builddir)/rpmio/librpmio.la