1ae97179d7
doesn't appear to use gettext, so remove the gettext module. Respect CC and CFLAGS when building. OK ajacoutot@ on an earlier version
137 lines
4.9 KiB
Plaintext
137 lines
4.9 KiB
Plaintext
$OpenBSD: patch-gtk_makefile,v 1.6 2011/11/15 19:17:09 jeremy Exp $
|
|
--- gtk/makefile.orig Fri Sep 16 11:14:07 2011
|
|
+++ gtk/makefile Tue Nov 15 19:30:57 2011
|
|
@@ -5,13 +5,6 @@
|
|
# GNU make does not like \r\n line endings so should be saved to CVS in binary form.
|
|
|
|
.SUFFIXES: .cxx .o .h .a .c
|
|
-ifdef CLANG
|
|
-CC = clang
|
|
-CCOMP = clang
|
|
-else
|
|
-CC = g++
|
|
-CCOMP = gcc
|
|
-endif
|
|
AR = ar
|
|
|
|
ifdef GTK3
|
|
@@ -24,20 +17,21 @@ endif
|
|
CONFIGFLAGS:=$(shell pkg-config --cflags $(GTKVERSION))
|
|
CONFIGLIB:=$(shell pkg-config --libs $(GTKVERSION) gthread-2.0)
|
|
CONFIGTHREADS:=
|
|
-gnomeprefix:=$(shell pkg-config --variable=prefix $(GTKVERSION) 2>/dev/null)
|
|
+#gnomeprefix:=$(shell pkg-config --variable=prefix $(GTKVERSION) 2>/dev/null)
|
|
ifndef prefix
|
|
ifdef gnomeprefix
|
|
prefix=$(gnomeprefix)
|
|
else
|
|
- prefix=/usr
|
|
+ prefix=${PREFIX}
|
|
endif
|
|
endif
|
|
datadir=$(prefix)/share
|
|
pixmapdir=$(datadir)/pixmaps
|
|
bindir=$(prefix)/bin
|
|
SYSCONF_PATH=$(prefix)/share/scite
|
|
+DOC_PATH=$(prefix)/share/doc/scite
|
|
|
|
-INSTALL=install
|
|
+INSTALL=install -o root -g bin
|
|
|
|
PROG = ../bin/SciTE
|
|
|
|
@@ -46,19 +40,21 @@ all: $(PROG)
|
|
vpath %.h ../src ../../scintilla/include
|
|
vpath %.cxx ../src
|
|
|
|
-INCLUDEDIRS=-I ../../scintilla/include -I ../src
|
|
+INCLUDEDIRS=-I ${prefix}/include/scintilla -I ../src -I ${prefix}/include
|
|
ifdef CHECK_DEPRECATED
|
|
DEPRECATED=-DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED
|
|
endif
|
|
-CXXBASEFLAGS=-W -Wall -Wno-char-subscripts -pedantic -DGTK -DSCI_LEXER -DPIXMAP_PATH=\"$(pixmapdir)\" -DSYSCONF_PATH=\"$(SYSCONF_PATH)\" $(INCLUDEDIRS) $(DEPRECATED)
|
|
+CXXBASEFLAGS=-W -Wall -Wno-char-subscripts -pedantic -Dunix -DGTK -DSCI_LEXER -DPIXMAP_PATH=\"$(pixmapdir)\" -DSYSCONF_PATH=\"$(SYSCONF_PATH)\" $(INCLUDEDIRS) $(DEPRECATED)
|
|
|
|
ifdef DEBUG
|
|
-CXXTFLAGS=-DDEBUG -g $(CXXBASEFLAGS)
|
|
+CXXTFLAGS+=-DDEBUG -g $(CXXBASEFLAGS)
|
|
else
|
|
-CXXTFLAGS=-DNDEBUG -Os $(CXXBASEFLAGS)
|
|
+CXXTFLAGS+=-DNDEBUG $(CXXBASEFLAGS)
|
|
endif
|
|
|
|
-ifndef NO_LUA
|
|
+LIBS= -L $(prefix)/lib -lscintilla -lscintilla_lexers
|
|
+
|
|
+ifdef LUA
|
|
LUA_CORE_OBJS = lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o \
|
|
lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o \
|
|
ltable.o ltm.o lundump.o lvm.o lzio.o
|
|
@@ -70,10 +66,10 @@ LUA_OBJS = LuaExtension.o $(LUA_CORE_OBJS) $(LUA_LIB_O
|
|
|
|
vpath %.c ../lua/src ../lua/src/lib
|
|
|
|
-INCLUDEDIRS=-I ../../scintilla/include -I ../src -I../lua/include
|
|
+INCLUDEDIRS+=-I../lua/include
|
|
|
|
.c.o:
|
|
- $(CCOMP) $(CFLAGS) $(INCLUDEDIRS) -DLUA_USE_POSIX $(CXXTFLAGS) -c $< -o $@
|
|
+ $(CC) $(CFLAGS) $(INCLUDEDIRS) -DLUA_USE_POSIX $(CXXTFLAGS) -c $< -o $@
|
|
|
|
else
|
|
CXXFLAGS+=-DNO_LUA
|
|
@@ -90,22 +86,19 @@ CXXFLAGS:=$(CXXFLAGS) -Dunix
|
|
endif
|
|
|
|
.cxx.o:
|
|
- $(CC) $(CONFIGFLAGS) $(CXXFLAGS) -c $< -o $@
|
|
+ $(CXX) $(CONFIGFLAGS) $(CXXFLAGS) -c $< -o $@
|
|
|
|
clean:
|
|
rm -f *.o $(PROG)
|
|
|
|
deps:
|
|
- $(CC) -MM $(CONFIGFLAGS) $(CXXFLAGS) *.cxx ../src/*.cxx | sed -e 's/\/usr.* //' | grep [a-zA-Z] >deps.mak
|
|
+ $(CXX) -MM $(CONFIGFLAGS) $(CXXFLAGS) *.cxx ../src/*.cxx | sed -e 's/\/usr.* //' | grep [a-zA-Z] >deps.mak
|
|
|
|
-# make should be run in ../../scintilla/gtk to compile all the lexers.
|
|
-COMPLIB=../../scintilla/bin/scintilla.a
|
|
-
|
|
$(PROG): SciTEGTK.o GUIGTK.o Widget.o \
|
|
-FilePath.o SciTEBase.o Credits.o SciTEBuffers.o SciTEIO.o StringList.o Exporters.o StringHelpers.o \
|
|
-PropSetFile.o MultiplexExtension.o DirectorExtension.o SciTEProps.o StyleWriter.o Utf8_16.o \
|
|
+ FilePath.o SciTEBase.o Credits.o SciTEBuffers.o SciTEIO.o StringList.o Exporters.o StringHelpers.o \
|
|
+ PropSetFile.o MultiplexExtension.o DirectorExtension.o SciTEProps.o StyleWriter.o Utf8_16.o \
|
|
JobQueue.o GTKMutex.o IFaceTable.o $(COMPLIB) $(LUA_OBJS)
|
|
- $(CC) `$(CONFIGTHREADS)` -rdynamic -Wl,--as-needed -Wl,--version-script lua.vers -DGTK $^ -o $@ $(CONFIGLIB) $(LIBDL) -lstdc++
|
|
+ $(CXX) `$(CONFIGTHREADS)` $(LIBS) -rdynamic -Wl,--as-needed -Wl,--version-script lua.vers -DGTK $^ -o $@ $(CONFIGLIB) $(LIBDL) -lstdc++
|
|
|
|
# Automatically generate header dependencies with "make deps"
|
|
include deps.mak
|
|
@@ -114,19 +107,18 @@ include deps.mak
|
|
# This is OK - just means no SciTE in the Gnome Applications menu
|
|
# Dead: install -D SciTEGTK.properties $(SYSCONF_PATH)/SciTEGlobal.properties
|
|
install:
|
|
- $(INSTALL) -m 755 -d $(DESTDIR)$(bindir) $(DESTDIR)$(SYSCONF_PATH)
|
|
+ $(INSTALL) -m 755 -d $(bindir) $(SYSCONF_PATH)
|
|
|
|
- $(INSTALL) -m 755 $(PROG) $(DESTDIR)$(bindir)
|
|
+ $(INSTALL) -m 755 $(PROG) $(bindir)
|
|
+ $(INSTALL) -m 755 -d $(SYSCONF_PATH) $(DOC_PATH)
|
|
+ $(INSTALL) -m 444 ../src/*.properties $(SYSCONF_PATH)
|
|
+ $(INSTALL) -m 444 ../doc/*.html ../doc/SciTEIco.png ../doc/PrintHi.png $(DOC_PATH)
|
|
|
|
- for files in ../src/*.properties ../doc/*.html ../doc/SciTEIco.png ../doc/PrintHi.png; \
|
|
- do \
|
|
- $(INSTALL) -m 644 $$files $(DESTDIR)$(SYSCONF_PATH); \
|
|
- done
|
|
|
|
ifdef gnomeprefix
|
|
$(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/applications $(DESTDIR)$(pixmapdir)
|
|
$(INSTALL) -m 755 SciTE.desktop $(DESTDIR)$(datadir)/applications/SciTE.desktop
|
|
- $(INSTALL) -m 644 Sci48M.png $(DESTDIR)$(pixmapdir)/Sci48M.png
|
|
+ $(INSTALL) -m 444 Sci48M.png $(DESTDIR)$(pixmapdir)/Sci48M.png
|
|
endif
|
|
|
|
uninstall:
|