]> git.pld-linux.org Git - packages/llvm.git/commitdiff
- llvm-config patch is no longer a script, so use patch instead of sedding auto/th/llvm-3.1-2
authorJakub Bogusz <qboosh@pld-linux.org>
Fri, 12 Oct 2012 17:01:45 +0000 (19:01 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Fri, 12 Oct 2012 17:01:45 +0000 (19:01 +0200)
- release 2

llvm-config.patch [new file with mode: 0644]
llvm.spec

diff --git a/llvm-config.patch b/llvm-config.patch
new file mode 100644 (file)
index 0000000..5d1b84e
--- /dev/null
@@ -0,0 +1,44 @@
+--- llvm-3.1.src/tools/llvm-config/llvm-config.cpp.orig        2012-05-16 00:06:08.000000000 +0200
++++ llvm-3.1.src/tools/llvm-config/llvm-config.cpp     2012-10-12 17:44:41.041037043 +0200
+@@ -234,11 +234,11 @@
+       break;
+     case CMakeStyle:
+       ActiveBinDir = ActiveObjRoot + "/bin";
+-      ActiveLibDir = ActiveObjRoot + "/lib";
++      ActiveLibDir = LLVM_LIBDIR;
+       break;
+     case CMakeBuildModeStyle:
+       ActiveBinDir = ActiveObjRoot + "/bin/" + LLVM_BUILDMODE;
+-      ActiveLibDir = ActiveObjRoot + "/lib/" + LLVM_BUILDMODE;
++      ActiveLibDir = LLVM_LIBDIR "/" LLVM_BUILDMODE;
+       break;
+     }
+@@ -249,7 +249,7 @@
+     ActivePrefix = CurrentExecPrefix;
+     ActiveIncludeDir = ActivePrefix + "/include";
+     ActiveBinDir = ActivePrefix + "/bin";
+-    ActiveLibDir = ActivePrefix + "/lib";
++    ActiveLibDir = LLVM_LIBDIR;
+     ActiveIncludeOption = "-I" + ActiveIncludeDir;
+   }
+--- llvm-3.1.src/autoconf/configure.ac.orig    2012-05-11 22:48:57.000000000 +0200
++++ llvm-3.1.src/autoconf/configure.ac 2012-10-12 17:39:00.668599306 +0200
+@@ -1472,13 +1472,13 @@
+ fi
+ eval LLVM_PREFIX="${prefix}";
+ eval LLVM_BINDIR="${prefix}/bin";
+-eval LLVM_LIBDIR="${prefix}/lib";
++eval LLVM_LIBDIR="${libdir}";
+ eval LLVM_DATADIR="${prefix}/share/llvm";
+ eval LLVM_DOCSDIR="${prefix}/share/doc/llvm";
+ eval LLVM_ETCDIR="${prefix}/etc/llvm";
+ eval LLVM_INCLUDEDIR="${prefix}/include";
+-eval LLVM_INFODIR="${prefix}/info";
+-eval LLVM_MANDIR="${prefix}/man";
++eval LLVM_INFODIR="${datadir}/info";
++eval LLVM_MANDIR="${datadir}/man";
+ LLVM_CONFIGTIME=`date`
+ AC_SUBST(LLVM_PREFIX)
+ AC_SUBST(LLVM_BINDIR)
index 1c7d1e5b3e746a35d074a82fd10956afbbb399e6..0a3f8c8e6f8ea42bfa1f1d1f7662579e605891e9 100644 (file)
--- a/llvm.spec
+++ b/llvm.spec
@@ -13,17 +13,20 @@ Summary:    The Low Level Virtual Machine (An Optimizing Compiler Infrastructure)
 Summary(pl.UTF-8):     Niskopoziomowa maszyna wirtualna (infrastruktura kompilatora optymalizującego)
 Name:          llvm
 Version:       3.1
-Release:       1
+Release:       2
 License:       University of Illinois/NCSA Open Source License
 Group:         Development/Languages
 Source0:       http://llvm.org/releases/%{version}/%{name}-%{version}.src.tar.gz
 # Source0-md5: 16eaa7679f84113f65b12760fdfe4ee1
 Source1:       http://llvm.org/releases/%{version}/clang-%{version}.src.tar.gz
 # Source1-md5: 59bf2d3120a3805f27cafda3823caaf8
+Patch0:                %{name}-config.patch
 # Data files should be installed with timestamps preserved
-Patch3:                %{name}-2.6-timestamp.patch
-Patch4:                %{name}-pld.patch
+Patch1:                %{name}-2.6-timestamp.patch
+Patch2:                %{name}-pld.patch
 URL:           http://llvm.org/
+BuildRequires: autoconf >= 2.60
+BuildRequires: automake >= 1:1.9.6
 BuildRequires: bash
 BuildRequires: bison
 BuildRequires: flex
@@ -38,6 +41,7 @@ BuildRequires:        tcl-devel
 %endif
 BuildRequires: groff
 BuildRequires: libltdl-devel
+BuildRequires: libtool >= 2:1.5.22
 BuildRequires: libstdc++-devel >= 5:3.4
 BuildRequires: ocaml-ocamldoc
 BuildRequires: perl-base >= 1:5.6
@@ -240,8 +244,9 @@ Dokumentacja HTML wiązania OCamla do LLVM-a.
 %prep
 %setup -q -a1 -n %{name}-%{version}.src
 mv clang-*.* tools/clang
-%patch3 -p1
-%patch4 -p1
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
 
 # configure does not properly specify libdir
 sed -i 's|(PROJ_prefix)/lib|(PROJ_prefix)/%{_lib}|g' Makefile.config.in
@@ -254,6 +259,12 @@ grep -rl /usr/bin/env tools utils | xargs sed -i -e '1{
 install -d obj
 
 %build
+cd autoconf
+%{__aclocal} -I m4
+%{__autoconf} -o ../configure configure.ac
+cd ..
+%{__autoheader} -I autoconf -I autoconf/m4 autoconf/configure.ac
+
 # Disabling assertions now, rec. by pure and needed for OpenGTL
 # TESTFIX no PIC on ix86: http://llvm.org/bugs/show_bug.cgi?id=3801
 #
@@ -307,8 +318,8 @@ done
 # Move documentation back to build directory
 rm -rf moredocs
 mv $RPM_BUILD_ROOT/moredocs .
-rm -fv moredocs/*.tar.gz
-rm -fv moredocs/ocamldoc/html/*.tar.gz
+%{__rm} -v moredocs/*.tar.gz
+%{__rm} -v moredocs/ocamldoc/html/*.tar.gz
 
 # and separate the apidoc
 %if %{with apidocs}
@@ -325,11 +336,7 @@ for f in LICENSE.TXT NOTES.txt README.txt; do
 done
 
 # Get rid of erroneously installed example files.
-rm -v $RPM_BUILD_ROOT%{_libdir}/*LLVMHello.*
-
-# FIXME file this bug
-sed -i 's,ABS_RUN_DIR/lib",ABS_RUN_DIR/%{_lib}",' \
-       $RPM_BUILD_ROOT%{_bindir}/llvm-config
+%{__rm} -v $RPM_BUILD_ROOT%{_libdir}/*LLVMHello.*
 
 # remove documentation makefiles:
 # they require the build directory to work
This page took 0.127669 seconds and 4 git commands to generate.