diff options
Diffstat (limited to 'cad/kicad/files/patch-libs.FreeBSD')
-rw-r--r-- | cad/kicad/files/patch-libs.FreeBSD | 205 |
1 files changed, 75 insertions, 130 deletions
diff --git a/cad/kicad/files/patch-libs.FreeBSD b/cad/kicad/files/patch-libs.FreeBSD index faea1d41e9a2..9cc864c95e67 100644 --- a/cad/kicad/files/patch-libs.FreeBSD +++ b/cad/kicad/files/patch-libs.FreeBSD @@ -1,172 +1,117 @@ ---- libs.FreeBSD.orig Thu Jul 5 22:16:04 2007 -+++ libs.FreeBSD Thu Jul 5 22:19:03 2007 -@@ -13,9 +13,8 @@ - STD_INSTALL = 1 - - ifeq ($(STD_INSTALL), 1) --PREFIX = /usr --KICAD_BIN = $(PREFIX)/linux --KICAD_PLUGINS = $(PREFIX)/lib/kicad/plugins -+KICAD_BIN = $(PREFIX)/kicad/FreeBSD -+KICAD_PLUGINS = $(PREFIX)/kicad/FreeBSD/plugins - KICAD_DOCS=$(PREFIX)/share/doc/kicad - KICAD_DATA=$(PREFIX)/share/kicad - KICAD_MODULES=$(KICAD_DATA)/modules -@@ -25,9 +24,8 @@ +--- libs.FreeBSD.orig 2008-09-21 21:25:03.000000000 +0200 ++++ libs.FreeBSD 2008-09-21 23:12:06.000000000 +0200 +@@ -18,7 +18,7 @@ + # STD_INSTALL = 2 is used only to make static link (only useful when kicad run on an other + # linux distribution than the distributions used to compil kicad. + +-STD_INSTALL = 0 ++STD_INSTALL = 1 + + #******************************************* + #******************************************* +@@ -34,17 +34,16 @@ + endif - else - # used by myself (JP Charras) to build a statically linked distribution intalled in /usr/local (with STD_INSTALL = 0) --PREFIX = /usr/local/linux --KICAD_BIN = $(PREFIX)/bin --KICAD_PLUGINS = $(PREFIX)/linux/plugins -+KICAD_BIN = ${PREFIX}/kicad/FreeBSD -+KICAD_PLUGINS = $(PREFIX)/kicad/FreeBSD/plugins + ifeq ($(STD_INSTALL), 1) # Used to build linux distribs +-PREFIX = /usr # (can also be /usr/local) + KICAD_BIN = $(PREFIX)/bin # Install main binaries here + KICAD_PLUGINS = $(KICAD_BIN) # Install other binaries here + KICAD_DOCS=$(PREFIX)/share/doc/kicad # Install doc files here +-KICAD_DATA=$(PREFIX)/share/kicad # Install libraries and others files here ++# Install libraries and others files here ++KICAD_DATA = $(PREFIX)/share/kicad + + else # Install ALL files in /usr/local/kicad + # when STD_INSTALL = 0 or STD_INSTALL = 2 + # STD_INSTALL = 0 is used to build kicad intalled in /usr/local + # STD_INSTALL = 2 is used by myself (JP Charras) to build a statically linked distribution intalled in /usr/local +-PREFIX = /usr/local/kicad + KICAD_BIN = $(PREFIX)/bin + KICAD_PLUGINS = $(KICAD_BIN)/plugins KICAD_DOCS=$(PREFIX)/help - KICAD_DATA=$(PREFIX) - KICAD_MODULES=$(KICAD_DATA)/modules -@@ -52,10 +50,10 @@ - # common CPPFLAGS to all components, further CPPFLAGS customization in +@@ -57,7 +56,7 @@ + KICAD_TEMPLATE=$(KICAD_DATA)/template + + # define compil and link +-LD = g++ ++LD = $(CXX) + + SRCSUFF = .cpp + OBJSUFF = .o +@@ -71,12 +70,12 @@ + # common CPPFLAGS to all components, further CPPFLAGS customization in # directory specific makefile.gtk files. ifeq ($(DEBUG), 1) --CPPFLAGS = -Wall -g `wx-config --debug --cxxflags` -fno-strict-aliasing -+CPPFLAGS = -Wall -g `${WX_CONFIG} --debug --cxxflags` -fno-strict-aliasing - LDFLAGS = -g #-v +-WXXFLAGS := $(shell wx-config --debug --cxxflags) +-CPPFLAGS = -Wall -g3 -ggdb3 ${WXXFLAGS} -fno-strict-aliasing -DDEBUG -D_UNICODE +-LDFLAGS = -g3 -ggdb3 #-v ++WXXFLAGS := `${WX_CONFIG} --debug --cxxflags` ++CPPFLAGS = -Wall -g ${WXXFLAGS} -fno-strict-aliasing -DDEBUG -D_UNICODE ++LDFLAGS = -g #-v else --CPPFLAGS = -Wall -O2 `wx-config --cxxflags` -fno-strict-aliasing -+CPPFLAGS = -Wall `${WX_CONFIG} --cxxflags` -fno-strict-aliasing +-WXXFLAGS := $(shell wx-config --cxxflags) +-CPPFLAGS = -Wall -O2 ${WXXFLAGS} -fno-strict-aliasing -D_UNICODE ++WXXFLAGS := `${WX_CONFIG} --cxxflags` ++CPPFLAGS+= -Wall ${WXXFLAGS} -fno-strict-aliasing -D_UNICODE LDFLAGS = -s #-v endif -@@ -66,47 +64,47 @@ - # You must uncomment these lines for static link (or build with "make -f makefile.gtk KICAD_STATIC_LINK=1") - # dynamic link is less difficult than static link and is what you would normally want - # to use if kicad is running only on your system or one with same level of libraries. --ifndef KICAD_PYTHON --ifeq ($(STD_INSTALL), 0) --KICAD_STATIC_LINK = 1 --endif --endif -+#ifndef KICAD_PYTHON -+#ifeq ($(STD_INSTALL), 0) -+#KICAD_STATIC_LINK = 1 -+#endif -+#endif - - ifeq ($(KICAD_STATIC_LINK), 1) --LD = gcc -+LD = ${CC} - else --LD = g++ -+LD = ${CXX} - endif +@@ -88,28 +87,28 @@ ifdef KICAD_PYTHON --PYTHON_VERSION=2.5 + PYTHON_VERSION=2.5 -PYLIBS= -L/usr/lib -PYLIBS+= -L /usr/include/python -+PYTHON_VERSION=2.4 +PYLIBS= -L${LOCALBASE}/lib +PYLIBS+= -L${LOCALBASE}/lib/python$(PYTHON_VERSION) PYLIBS+= -lpython$(PYTHON_VERSION) - PYLIBS+= -lboost_python + PYLIBS+= -lboost_python-mt -EXTRACPPFLAGS+=-I /usr/include/python$(PYTHON_VERSION) -DKICAD_PYTHON -fno-strict-aliasing +EXTRACPPFLAGS+=-I ${LOCALBASE}/python$(PYTHON_VERSION) -DKICAD_PYTHON -fno-strict-aliasing endif - # path and version definition for wxWidgets and mesa libs + # mesa (free opengl library) libs -MESALIBSPATH = /usr/local/lib ++MESALIBSPATH = ${LOCALBASE}/lib + + #for static link: add wx gl lib +-LIBVERSION=`wx-config --release` -WXPATH = `wx-config --prefix`/lib -PREFIX_WX_LIBS = lib`wx-config --basename` --SUFFIX_WX_LIBSTD = `wx-config --utility=` --SUFFIX_WX_LIBGL = _gl-$(LIBVERSION).a -+MESALIBSPATH = ${LOCALBASE}/lib ++LIBVERSION=`${WX_CONFIG} --release` +WXPATH = `${WX_CONFIG} --prefix`/lib +PREFIX_WX_LIBS = lib`${WX_CONFIG} --basename` -+SUFFIX_WX_LIBSTD = `${WX_CONFIG} --utility=` -+SUFFIX_WX_LIBGL = _gl-$(LIBVERSION) - - # Use static link for libstdc++.a (sometimes also libsupc++.a) - # locate libstdc++.a and copy it in kicad_dev/syslibs - ifeq ($(KICAD_STATIC_LINK), 1) - #define path for a copy of libstdc++.a or/and libsupc++.a: --LIBSTDC = ../syslibs/libstdc++.a -+LIBSTDC = /usr/lib/libstdc++.a + SUFFIX_WX_LIBGL = _gl-$(LIBVERSION).a + + ifeq ($(DEBUG), 1) + # debug wxWidgets +-WXSYSLIB= `wx-config --debug --libs std` ++WXSYSLIB= `${WX_CONFIG} --debug --libs std` else - # Or Use static link for libsupc++ or libstdc++ (more easy!!) - LIBSTDC = -lstdc++ + # or use "standard command" for wxWidgets +-WXSYSLIB= `wx-config --libs std` ++WXSYSLIB= `${WX_CONFIG} --libs std` endif + # use link static +@@ -119,16 +118,16 @@ --LIBVERSION=`wx-config --release` --LIBREGEX=$(WXPATH)/libwxregexu-$(LIBVERSION).a -+LIBVERSION=`${WX_CONFIG} --release` -+LIBREGEX= - - # use link static for wxWidgets - ifeq ($(KICAD_STATIC_LINK), 1) -@@ -114,11 +112,11 @@ - $(MESALIBSPATH)/libGL.a $(MESALIBSPATH)/libGLU.a - - WXSYSLIB= $(WXPATH)/$(PREFIX_WX_LIBS)-$(LIBVERSION).a \ -- $(WXPATH)/libwxpng-$(LIBVERSION).a\ -- $(WXPATH)/libwxjpeg-$(LIBVERSION).a\ -- $(WXPATH)/libwxzlib-$(LIBVERSION).a\ -+ -lpng\ -+ -ljpeg\ -+ -lz\ - $(LIBREGEX)\ -- /usr/X11R6/lib/libXinerama.a \ -+ ${LOCALBASE}/lib/libXinerama.a \ - -lgtk-x11-2.0 -lgdk-x11-2.0 \ - -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lgthread-2.0\ - -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl\ -@@ -127,37 +125,37 @@ - - - WXSYSLIB_WITH_GL= $(WXPATH)/$(PREFIX_WX_LIBS)-$(LIBVERSION).a \ -- $(WXPATH)/libwxpng-$(LIBVERSION).a\ -- $(WXPATH)/libwxjpeg-$(LIBVERSION).a\ -- $(WXPATH)/libwxzlib-$(LIBVERSION).a\ -+ -lpng\ -+ -ljpeg\ -+ -lz\ - $(LIBS3D)\ -- /usr/X11R6/lib/libXinerama.a \ -- /usr/X11R6/lib/libXxf86vm.a \ -+ ${LOCALBASE}/lib/libXinerama.a \ -+ ${LOCALBASE}/lib/libXxf86vm.a \ - -lgtk-x11-2.0 -lgdk-x11-2.0 \ - -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lgthread-2.0\ - -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl\ - -lglib-2.0 -lpangoft2-1.0 -lSM\ -- -L/usr/lib $(PYLIBS) -+ -L${LOCALBASE}/lib $(PYLIBS) else - ifeq ($(DEBUG), 1) - # debug wxWidgets --WXSYSLIB= `wx-config --debug --libs std` -WXSYSLIB_WITH_GL= `wx-config --debug --libs std,gl` -+WXSYSLIB= `${WX_CONFIG} --debug --libs std` +WXSYSLIB_WITH_GL= `${WX_CONFIG} --debug --libs std,gl` else - # or use "standard command" for wxWidgets --WXSYSLIB= `wx-config --libs std` -WXSYSLIB_WITH_GL= `wx-config --libs std,gl` -+WXSYSLIB= `${WX_CONFIG} --libs std` +WXSYSLIB_WITH_GL= `${WX_CONFIG} --libs std,gl` endif - endif - # attention à l'ordre des libairies + # attention a l'ordre des libairies -LIBS = -L/usr/local/lib -L/usr/X11R6/lib\ -+LIBS = -L${LOCALBASE}/lib\ - $(EXTRALIBS) $(WXSYSLIB)\ - $(LIBSTDC) $(PYLIBS) ++LIBS = -L${LOCALBASE}/lib \ + $(EXTRALIBS) $(WXSYSLIB) $(PYLIBS) -LIBS_WITH_GL = -L/usr/local/lib -L/usr/X11R6/lib\ -+LIBS_WITH_GL = -L${LOCALBASE}/lib\ - $(EXTRALIBS) $(WXSYSLIB_WITH_GL)\ - $(LIBSTDC) $(PYLIBS) ++LIBS_WITH_GL = -L${LOCALBASE}/lib \ + $(EXTRALIBS) $(WXSYSLIB_WITH_GL) $(PYLIBS) |