openbsd-ports/editors/scite/patches/patch-gtk_makefile
sturm a0dfeaa0c2 Initial import of scite 1.54
SciTE is short for SCIntillla based Text Editor. It is a very
flexible but still small and fast editor providing block folding,
syntax highlighting, regular expression search & replace etc.

WWW: http://www.scintilla.org/SciTE.html

from Joerg Sonnenberger <joerg@bec.de> with patches from Andrew Dalgleish
2003-08-14 18:27:25 +00:00

88 lines
3.1 KiB
Plaintext

$OpenBSD: patch-gtk_makefile,v 1.1.1.1 2003/08/14 18:27:25 sturm Exp $
--- gtk/makefile.orig 2003-07-26 14:06:38.000000000 +0200
+++ gtk/makefile 2003-08-14 20:12:49.000000000 +0200
@@ -17,17 +17,17 @@ gnomeprefix:=$(shell pkg-config --variab
else
CONFIGFLAGS=gtk-config --cflags
CONFIGLIB=gtk-config --libs
-gnomeprefix:=$(shell gnome-config --prefix 2>/dev/null)
endif
ifdef gnomeprefix
prefix=$(gnomeprefix)
datadir=$(gnomeprefix)/share
pixmapdir=$(datadir)/pixmaps
else
- prefix=/usr
+ prefix=$(PREFIX)
endif
bindir=$(prefix)/bin
SYSCONF_PATH=$(prefix)/share/scite
+DOC_PATH=$(prefix)/share/doc/scite
PROG = ../bin/SciTE
@@ -35,15 +35,17 @@ vpath %.h ../src ../../scintilla/include
vpath %.cxx ../src
#CXXFLAGS= -g -DGTK -DSCI_LEXER -DSYSCONF_PATH=\"$(SYSCONF_PATH)\" -Wwrite-strings
-INCLUDEDIRS=-I ../../scintilla/include -I ../src
-CXXBASEFLAGS=-W -Wall -DGTK -DSCI_LEXER -DSYSCONF_PATH=\"$(SYSCONF_PATH)\" $(INCLUDEDIRS)
+INCLUDEDIRS=-I $(prefix)/include/scintilla -I ../src
+CXXBASEFLAGS=-W -Wall -Dunix -DGTK -DSCI_LEXER -DSYSCONF_PATH=\"$(SYSCONF_PATH)\" $(INCLUDEDIRS)
ifdef DEBUG
-CXXFLAGS=-DDEBUG -g $(CXXBASEFLAGS)
+CXXFLAGS+=-DDEBUG -g $(CXXBASEFLAGS)
else
-CXXFLAGS=-DNDEBUG -Os $(CXXBASEFLAGS)
+CXXFLAGS+=-DNDEBUG $(CXXBASEFLAGS)
endif
+LIBS= -L $(prefix)/lib -lscintilla -lscintilla_lexers -lscintilla
+
.cxx.o:
$(CC) `$(CONFIGFLAGS)` $(CXXFLAGS) -c $< -o $@
@@ -55,12 +57,9 @@ clean:
deps:
$(CC) -MM `$(CONFIGFLAGS)` $(CXXFLAGS) *.cxx ../src/*.cxx >deps.mak
-# make should be run in ../../scintilla/gtk to compile all the lexers.
-LEXEROBJS=$(wildcard ../../scintilla/gtk/Lex*.o)
-
$(PROG): SciTEGTK.o SciTEBase.o SciTEBuffers.o SciTEIO.o Exporters.o DirectorExtension.o \
-SciTEProps.o Utf8_16.o $(LEXEROBJS) ../../scintilla/bin/scintilla.a
- $(CC) `$(CONFIGLIB)` `glib-config --libs gthread` -DGTK $^ -o $@
+SciTEProps.o Utf8_16.o
+ $(CC) $^ $(LIBS) `$(CONFIGLIB)` `glib-config --libs gthread` -o $@
# SciTE-static no longer builds. Kept here in case of later need.
SciTE-static: SciTEGTK.o SciTEBase.o SciTEBuffers.o SciTEIO.o Exporters.o SciTEProps.o \
@@ -74,17 +73,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 -s $(PROG) $(bindir)
- install -d $(SYSCONF_PATH)
- install ../src/*.properties $(SYSCONF_PATH)
- install ../doc/*.html $(SYSCONF_PATH)
- install ../doc/SciTEIco.png $(SYSCONF_PATH)
- install ../doc/PrintHi.png $(SYSCONF_PATH)
+ install -m 755 -s $(PROG) $(bindir)
+ install -d $(SYSCONF_PATH) $(DOC_PATH)
+ install -m 444 ../src/*.properties $(SYSCONF_PATH)
+ install -m 444 ../doc/*.html $(DOC_PATH)
+ install -m 444 ../doc/SciTEIco.png $(DOC_PATH)
+ install -m 444 ../doc/PrintHi.png $(DOC_PATH)
ifdef gnomeprefix
ifndef GTK2
- install SciTE.desktop $(datadir)/gnome/apps/Applications
+ install -d $(datadir)/gnome/apps/Applications
+ install -m 444 SciTE.desktop $(datadir)/gnome/apps/Applications
endif
- install Sci48M.png $(pixmapdir)
+ install -m 444 Sci48M.png $(pixmapdir)
endif
uninstall: