Codebase list libsdl-sge / 49cf389
Fix FTCBFS: (Closes: #912141) + Let dh_auto_build pass cross tools to make. + cross.patch: Make pkg-config substitutable. + cross.patch: Fix makefile dependencies to avoid excessive rebuilds during make install. Helmut Grohne authored 5 years ago Manuel A. Fernandez Montecelo committed 5 years ago
4 changed file(s) with 80 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
0 libsdl-sge (030809dfsg-8.1) UNRELEASED; urgency=medium
1
2 * Non-maintainer upload.
3 * Fix FTCBFS: (Closes: #-1)
4 + Let dh_auto_build pass cross tools to make.
5 + cross.patch: Make pkg-config substitutable.
6 + cross.patch: Fix makefile dependencies to avoid excessive
7 rebuilds during make install.
8
9 -- Helmut Grohne <helmut@subdivi.de> Sun, 28 Oct 2018 14:40:16 +0100
10
011 libsdl-sge (030809dfsg-8) unstable; urgency=medium
112
213 * Bump Policy Standars-Version to 4.2.1 (no changes needed)
0 --- libsdl-sge-030809dfsg.orig/Makefile.conf
1 +++ libsdl-sge-030809dfsg/Makefile.conf
2 @@ -11,6 +11,7 @@
3 # Compilers (C and C++)
4 CC=gcc
5 CXX=g++
6 +PKG_CONFIG?=pkg-config
7
8 # Make sure sdl-config is available
9 HAVE_SDL =$(shell if (sdl-config --version) < /dev/null > /dev/null 2>&1; then echo "y"; else echo "n"; fi;)
10 @@ -36,15 +37,15 @@
11
12
13 # Is freetype-config available?
14 -HAVE_FT =$(shell if (pkg-config --modversion freetype2) < /dev/null > /dev/null 2>&1; then echo "y"; else echo "n"; fi;)
15 +HAVE_FT =$(shell if ($(PKG_CONFIG) --modversion freetype2) < /dev/null > /dev/null 2>&1; then echo "y"; else echo "n"; fi;)
16 ifeq ($(HAVE_FT),n)
17 USE_FT = n
18 endif
19
20 ifneq ($(USE_FT),n)
21 USE_FT = y
22 - SGE_LIBS +=$(shell pkg-config freetype2 --libs)
23 - FT_CFLAGS =$(shell pkg-config freetype2 --cflags)
24 + SGE_LIBS +=$(shell $(PKG_CONFIG) freetype2 --libs)
25 + FT_CFLAGS =$(shell $(PKG_CONFIG) freetype2 --cflags)
26 endif
27
28
29 --- libsdl-sge-030809dfsg.orig/Makefile
30 +++ libsdl-sge-030809dfsg/Makefile
31 @@ -11,20 +11,21 @@
32
33 OBJECTS=sge_surface.o sge_primitives.o sge_tt_text.o sge_bm_text.o sge_misc.o sge_textpp.o sge_blib.o sge_rotation.o sge_collision.o sge_shape.o
34
35 -all: config $(OBJECTS)
36 +all: sge_config.h $(OBJECTS)
37 ar rsc libSGE.a $(OBJECTS)
38
39 $(OBJECTS): %.o:%.cpp %.h #Each object depends on thier .cpp and .h file
40 $(CXX) $(CFLAGS) -c $<
41
42 -shared: all
43 +shared: libSGE.so
44 +libSGE.so: sge_config.h $(OBJECTS)
45 $(CXX) $(CFLAGS) $(LDFLAGS) -Wl,-soname,libSGE.so.$(API_VER) -fpic -fPIC -shared -o libSGE.so $(OBJECTS) $(LIBS)
46
47 shared-strip: shared
48 @strip libSGE.so
49
50 # Building a dll... I have no idea how to do this, but it should be something like below.
51 -dll: config $(OBJECTS)
52 +dll: sge_config.h $(OBJECTS)
53 dlltool --output-def SGE.def $(OBJECTS)
54 dllwrap --driver-name $(CXX) -o SGE.dll --def SGE.def --output-lib libSGE.a --dllname SGE.dll $(OBJECTS) $(LIBS)
55
56 @@ -34,7 +35,8 @@
57 clean:
58 rm -f *.o *.so *.so.* *.a *.dll *.def
59
60 -config:
61 +config:sge_config.h
62 +sge_config.h:
63 @echo "/* SGE Config header (generated automatically) */" >sge_config.h
64 @echo "#define SGE_VER $(SGE_VER)" >>sge_config.h
65 ifeq ($(C_COMP),y)
55 010_examples.diff
66 015_overflow.diff
77 100_font.diff
8 cross.patch
2020 override_dh_auto_build:
2121 # Build the static library and make a backup
2222 rm -f libSGE.a
23 $(MAKE) all CUSTOM_CFLAGS="$(ALL_CUSTOM_CFLAGS)" CUSTOM_LDFLAGS="$(ALL_CUSTOM_LDFLAGS)"
23 dh_auto_build -- all CUSTOM_CFLAGS="$(ALL_CUSTOM_CFLAGS)" CUSTOM_LDFLAGS="$(ALL_CUSTOM_LDFLAGS)"
2424 rm -f libSGE.bak
2525 mv libSGE.a libSGE.bak
2626
2727 # Build the shared library and restore the static backup
2828 $(MAKE) clean
29 $(MAKE) shared CUSTOM_CFLAGS="$(ALL_CUSTOM_CFLAGS)" CUSTOM_LDFLAGS="$(ALL_CUSTOM_LDFLAGS)"
29 dh_auto_build -- shared CUSTOM_CFLAGS="$(ALL_CUSTOM_CFLAGS)" CUSTOM_LDFLAGS="$(ALL_CUSTOM_LDFLAGS)"
3030 rm -f libSGE.a
3131 mv libSGE.bak libSGE.a
3232