mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 17:59:20 -04:00
Fix linking and sparc64 build; small clean-up
PR: 160598 Approved by: Naram Qashat (maintainer)
This commit is contained in:
parent
efa5c62dfd
commit
43b25cb444
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=281725
2 changed files with 20 additions and 29 deletions
|
@ -7,6 +7,7 @@
|
|||
|
||||
PORTNAME= scintilla
|
||||
PORTVERSION= 2.28
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= x11-toolkits
|
||||
MASTER_SITES= SF/scintilla/SciTE/${PORTVERSION}
|
||||
DISTNAME= scite${PORTVERSION:S/.//g}
|
||||
|
@ -22,20 +23,21 @@ USE_ICONV= yes
|
|||
MAKEFILE= makefile
|
||||
USE_LDCONFIG= yes
|
||||
USE_GNOME= gtk20
|
||||
USE_GCC= 4.2+
|
||||
MAKE_JOBS_SAFE= yes
|
||||
MAKE_ENV+= LDFLAGS="${LDFLAGS}"
|
||||
CFLAGS+= -DPIC ${PICFLAG}
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if ${ARCH} == "sparc64"
|
||||
MAKE_ARGS+= PICFLAGS=-DPIC
|
||||
PICFLAG?= -fPIC
|
||||
.else
|
||||
MAKE_ARGS+= PICFLAGS="-DPIC -fPIC -fpic"
|
||||
PICFLAG?= -fpic
|
||||
.endif
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e 's|[(]CC[)]|(CXX)|g ; s|[(]CCOMP[)]|(CC)|g ; \
|
||||
s| -Os||g' ${WRKSRC}/makefile
|
||||
@${REINPLACE_CMD} -e 's|[(]CC[)]|(CXX)|g ; s|[(]CCOMP[)]|(CC)|g' \
|
||||
${WRKSRC}/makefile
|
||||
|
||||
do-install:
|
||||
${MKDIR} ${PREFIX}/include/scintilla
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- makefile.orig 2011-05-02 05:11:17.000000000 -0400
|
||||
+++ makefile 2011-07-03 21:09:17.000000000 -0400
|
||||
@@ -7,14 +7,14 @@
|
||||
--- makefile.orig 2011-07-31 22:49:04.000000000 -0400
|
||||
+++ makefile 2011-09-06 20:44:00.000000000 -0400
|
||||
@@ -7,14 +7,7 @@
|
||||
# Also works with ming32-make on Windows.
|
||||
|
||||
.SUFFIXES: .cxx .c .o .h .a
|
||||
|
@ -12,18 +12,11 @@
|
|||
-CCOMP = gcc
|
||||
-endif
|
||||
-AR = ar
|
||||
+#ifdef CLANG
|
||||
+#CC = clang
|
||||
+#CCOMP = clang
|
||||
+#else
|
||||
+#CC = g++
|
||||
+#CCOMP = gcc
|
||||
+#endif
|
||||
+AR = $(CXX) -shared
|
||||
+AR = $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared
|
||||
RANLIB = touch
|
||||
|
||||
ifdef GTK3
|
||||
@@ -36,7 +36,8 @@
|
||||
@@ -36,7 +29,8 @@
|
||||
COMPLIB=..\bin\scintilla.a
|
||||
else
|
||||
DEL = rm -f
|
||||
|
@ -33,7 +26,7 @@
|
|||
endif
|
||||
|
||||
vpath %.h ../src ../include ../lexlib
|
||||
@@ -55,24 +56,24 @@
|
||||
@@ -55,14 +49,15 @@
|
||||
endif
|
||||
|
||||
ifdef DEBUG
|
||||
|
@ -41,21 +34,17 @@
|
|||
+CXXFLAGS+=-DDEBUG -g $(CXXBASEFLAGS) $(THREADFLAGS)
|
||||
else
|
||||
-CXXFLAGS=-DNDEBUG -Os $(CXXBASEFLAGS) $(THREADFLAGS)
|
||||
+CXXFLAGS+=-DNDEBUG -Os $(CXXBASEFLAGS) $(THREADFLAGS)
|
||||
+CXXFLAGS+=-DNDEBUG $(CXXBASEFLAGS) $(THREADFLAGS)
|
||||
endif
|
||||
|
||||
CFLAGS:=$(CXXFLAGS)
|
||||
|
||||
-CONFIGFLAGS:=$(shell pkg-config --cflags $(GTKVERSION))
|
||||
+CONFIGFLAGS:=$(shell pkg-config --cflags gtk+-2.0 gthread-2.0)
|
||||
CONFIGFLAGS:=$(shell pkg-config --cflags $(GTKVERSION))
|
||||
+CONFIGLIBS:=$(shell pkg-config --libs $(GTKVERSION))
|
||||
MARSHALLER=scintilla-marshal.o
|
||||
|
||||
.cxx.o:
|
||||
- $(CC) $(CONFIGFLAGS) $(CXXFLAGS) -c $<
|
||||
+ $(CC) $(PICFLAGS) $(CONFIGFLAGS) $(CXXFLAGS) -c $<
|
||||
.c.o:
|
||||
- $(CCOMP) $(CONFIGFLAGS) $(CFLAGS) -w -c $<
|
||||
+ $(CCOMP) $(PICFLAGS) $(CONFIGFLAGS) $(CFLAGS) -w -c $<
|
||||
@@ -72,7 +67,7 @@
|
||||
|
||||
LEXOBJS:=$(addsuffix .o,$(basename $(notdir $(wildcard ../lexers/Lex*.cxx))))
|
||||
|
||||
|
@ -64,7 +53,7 @@
|
|||
|
||||
clean:
|
||||
$(DEL) *.o $(COMPLIB)
|
||||
@@ -85,9 +86,11 @@
|
||||
@@ -85,9 +80,11 @@
|
||||
ScintillaBase.o ContractionState.o Editor.o ExternalLexer.o PropSetSimple.o PlatGTK.o \
|
||||
KeyMap.o LineMarker.o PositionCache.o ScintillaGTK.o CellBuffer.o ViewStyle.o \
|
||||
RESearch.o RunStyles.o Selection.o Style.o Indicator.o AutoComplete.o UniConversion.o XPM.o \
|
||||
|
@ -72,10 +61,10 @@
|
|||
- $(AR) rc $@ $^
|
||||
- $(RANLIB) $@
|
||||
+ $(MARSHALLER)
|
||||
+ $(AR) $(CONFIGFLAGS:cflags=libs) -o $@ $^
|
||||
+ $(AR) -o $@ $^ -Wl,--as-needed $(CONFIGLIBS)
|
||||
+
|
||||
+$(LEXRLIB): $(LEXOBJS)
|
||||
+ $(AR) $(CONFIGFLAGS:cflags=libs) -o $@ $^
|
||||
+ $(AR) -o $@ $^ -Wl,--as-needed $(CONFIGLIBS)
|
||||
|
||||
# Automatically generate header dependencies with "make deps"
|
||||
include deps.mak
|
||||
|
|
Loading…
Add table
Reference in a new issue