Gentoo Archives: gentoo-commits

From: "Kacper Kowalik (xarthisius)" <xarthisius@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-util/astyle/files: astyle-2.02.1-build_system.patch
Date: Fri, 02 Mar 2012 17:26:48
Message-Id: 20120302172638.4085D2004B@flycatcher.gentoo.org
1 xarthisius 12/03/02 17:26:38
2
3 Added: astyle-2.02.1-build_system.patch
4 Log:
5 Version bump wrt bug #311281 by Arseny Solokha <asolokha@×××.com>. Use package's build system and helpers instead of rewriting it from scratch. Drop useless debug flag, install docs and build/install static lib conditionally
6
7 (Portage version: 2.2.0_alpha89/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.1 dev-util/astyle/files/astyle-2.02.1-build_system.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/astyle/files/astyle-2.02.1-build_system.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/astyle/files/astyle-2.02.1-build_system.patch?rev=1.1&content-type=text/plain
14
15 Index: astyle-2.02.1-build_system.patch
16 ===================================================================
17 --- a/build/gcc/Makefile
18 +++ b/build/gcc/Makefile
19 @@ -34,25 +34,25 @@
20 ipath=$(prefix)/bin
21 CBASEFLAGS = -W -Wall -fno-rtti -fno-exceptions
22 JAVAINCS = -I$(JAVA_HOME)/include
23 -CXX = g++
24 +CXX ?= g++
25 INSTALL=install -o $(USER) -g $(USER)
26
27 ##################################################
28
29 # define compile options for each build
30 -ifdef CFLAGS
31 - CFLAGSr = -DNDEBUG $(CBASEFLAGS) $(CFLAGS)
32 - CFLAGSd = -g $(CBASEFLAGS) $(CFLAGS)
33 +ifdef CXXFLAGS
34 + CFLAGSr = -DNDEBUG $(CBASEFLAGS) $(CXXFLAGS)
35 + CFLAGSd = -g $(CBASEFLAGS) $(CXXFLAGS)
36 else
37 CFLAGSr = -DNDEBUG -O3 $(CBASEFLAGS)
38 CFLAGSd = -g $(CBASEFLAGS)
39 endif
40 -CFLAGSs = -DASTYLE_LIB -fpic $(CFLAGSr)
41 -CFLAGSsd = -DASTYLE_LIB -fpic $(CFLAGSd)
42 +CFLAGSs = -DASTYLE_LIB -fPIC $(CFLAGSr)
43 +CFLAGSsd = -DASTYLE_LIB -fPIC $(CFLAGSd)
44 CFLAGSa = -DASTYLE_LIB $(CFLAGSr)
45 CFLAGSad = -DASTYLE_LIB $(CFLAGSd)
46 -CFLAGSsj = -DASTYLE_JNI -fpic $(CFLAGSr) $(JAVAINCS)
47 -CFLAGSsjd = -DASTYLE_JNI -fpic $(CFLAGSd) $(JAVAINCS)
48 +CFLAGSsj = -DASTYLE_JNI -fPIC $(CFLAGSr) $(JAVAINCS)
49 +CFLAGSsjd = -DASTYLE_JNI -fPIC $(CFLAGSd) $(JAVAINCS)
50
51 # define link options
52 ifdef LDFLAGS
53 @@ -134,7 +134,7 @@
54 shared: libastyle.so
55 libastyle.so: $(OBJs)
56 @ mkdir -p $(bindir)
57 - $(CXX) -shared $(LDFLAGSr) -o $(bindir)/$@ $^
58 + $(CXX) -shared -Wl,-soname,$@.0 $(LDFLAGSr) -o $(bindir)/$@.0.0.0 $^
59 @ echo
60
61 shareddebug: libastyled.so
62 @@ -158,7 +158,7 @@
63 java: libastylej.so
64 libastylej.so: $(OBJsj)
65 @ mkdir -p $(bindir)
66 - $(CXX) -shared $(LDFLAGSr) -o $(bindir)/$@ $^
67 + $(CXX) -shared -Wl,-soname,$@.0 $(LDFLAGSr) -o $(bindir)/$@.0.0.0 $^
68 @ echo
69
70 javadebug: libastylejd.so