Date: Mon, 30 Nov 1998 00:59:14 -0800 (PST) From: garbanzo@hooked.net To: freebsd-gnats-submit@FreeBSD.ORG Subject: ports/8904: Qt port has inaccurate dependencies, and hard coded CFLAGS Message-ID: <199811300859.AAA05099@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 8904 >Category: ports >Synopsis: Qt port has inaccurate dependencies, and hard coded CFLAGS >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Nov 30 01:00:01 PST 1998 >Last-Modified: >Originator: Alex Zepeda >Organization: >Release: 3.0-CURRENT >Environment: FreeBSD zippy.dyn.ml.org 3.0-CURRENT FreeBSD 3.0-CURRENT #0: Thu Nov 19 01:22:48 PST 1998 alex@zippy.dyn.ml.org:/usr/src/sys/compile/ZIPPY-SOFT i386 >Description: The Qt 1.41 port registers a dependency on Mesa3 needlessly, as the OpenGL dependant code isn't used or built. Manpages are installed needlessly too. The patch (patch-aa) hardcodes the C++ compiler as well as C++ flags. >How-To-Repeat: Build the ports. >Fix: diff -u configs/freebsd-g++-shared configs.new/freebsd-g++-shared --- configs/freebsd-g++-shared Thu Oct 1 14:12:11 1998 +++ configs.new/freebsd-g++-shared Sun Nov 22 20:36:17 1998 @@ -1,5 +1,5 @@ # Compiling -SYSCONF_CC = g++ +SYSCONF_CC = $(CXX) # Compiling with support libraries SYSCONF_CFLAGS_X11 = -I/usr/X11R6/include @@ -22,12 +22,12 @@ SYSCONF_LIBS_OPENGL = -lMesaGL -lMesaGLU -lXmu -lXext -lm # Linking applications -SYSCONF_LINK = g++ +SYSCONF_LINK = $(CXX) SYSCONF_LFLAGS = SYSCONF_LIBS = # Link flags shared objects -SYSCONF_LFLAGS_SHOBJ = -Bshareable +SYSCONF_LFLAGS_SHOBJ = -shared # Meta-object compiler SYSCONF_MOC = $(QTDIR)/bin/moc @@ -37,9 +37,20 @@ # - Place target in $(DESTDIR) - which has a trailing / # - Usually needs to incorporate $(VER_MAJ) and $(VER_MIN) # -SYSCONF_LINK_SHLIB = ld +SYSCONF_LINK_SHLIB = $(CXX) +ifeq (${PORTOBJFORMAT},"elf") +SYSCONF_LINK_TARGET_SHARED = lib$(TARGET).so.$(VER_MAJ) +else SYSCONF_LINK_TARGET_SHARED = lib$(TARGET).so.$(VER_MAJ).$(VER_MIN) -SYSCONF_LINK_LIB_SHARED = $(SYSCONF_LINK_SHLIB) -Bshareable $(LFLAGS) -o $(DESTDIR)$(SYSCONF_LINK_TARGET_SHARED) `lorder /usr/lib/c++rt0.o $(OBJECTS) $(OBJMOC) | tsort` $(LIBS) +endif +SYSCONF_LINK_LIB_SHARED = $(SYSCONF_LINK_SHLIB) -shared \ + $(LFLAGS) -Wl,-soname=$(SYSCONF_LINK_TARGET_SHARED) \ + -o $(DESTDIR)$(SYSCONF_LINK_TARGET_SHARED) \ + `lorder $(OBJECTS) $(OBJMOC) | tsort` $(LIBS); \ + mv $(SYSCONF_LINK_TARGET_SHARED) $(DESTDIR); \ + cd $(DESTDIR); \ + rm -f lib$(TARGET).so; \ + ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).so # Linking static libraries # - Build the $(TARGET) library, eg. lib$(TARGET).a @@ -51,11 +62,11 @@ $(SYSCONF_AR) $(DESTDIR)$(SYSCONF_LINK_TARGET_$ ranlib $(DESTDIR)$(SYSCONF_LINK_TARGET_STATIC) # Compiling application source -SYSCONF_CFLAGS = -O2 -fno-strength-reduce +SYSCONF_CFLAGS = $(CXXFLAGS) # Compiling library source -SYSCONF_CFLAGS_LIB = -O2 -fno-strength-reduce -fPIC +SYSCONF_CFLAGS_LIB = $(CXXFLAGS) -fPIC # Compiling shared-object source -SYSCONF_CFLAGS_SHOBJ = -O2 -fno-strength-reduce -fPIC +SYSCONF_CFLAGS_SHOBJ = $(CXXFLAGS) -fPIC # Default link type (stati linking is still be used where required) SYSCONF_LINK_LIB = $(SYSCONF_LINK_LIB_SHARED) SYSCONF_LINK_TARGET = $(SYSCONF_LINK_TARGET_SHARED) A somewhat retrofited port can be found at: http://www.wenet.net/~garbanzo/kde/qt-1.41.tgz >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199811300859.AAA05099>