Skip to contentSkip to conversation

xstroke: fix link issue

PATCH New Thomas Petazzoni 2 participants 3 messages Dec 18, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 xstroke: fix link issue

The allyespackageconfig builds have trigerred a link issue on xstroke. In fact, xstroke must be linked against Xrender, Xext and dl in addition to the other libraries it was already be linked against. We fix that by adding a patch that modifies configure.ac and Makefile.am, and enabling autoreconf for this package.

In addition, since xstroke uses directly Xrender and Xext, we add those dependencies to the package. In practice, it doesn't change anything, since some of the xstroke dependencies were already pulling those libraries, but as xstroke uses directly Xrender and Xext, it makes sense to have them as dependencies as well.

---
 package/xstroke/Config.in                     |    2 ++
 package/xstroke/xstroke-fix-link-issues.patch |   35 +++++++++++++++++++++++++
 package/xstroke/xstroke.mk                    |    3 ++-
 3 files changed, 39 insertions(+), 1 deletion(-)
 create mode 100644 package/xstroke/xstroke-fix-link-issues.patch
package/xstroke/Config.in +2 -0
index 54cb38e..1269934 100644
@@ -4,6 +4,8 @@ config BR2_PACKAGE_XSTROKE
 	select BR2_PACKAGE_XLIB_LIBXFT
 	select BR2_PACKAGE_XLIB_LIBXTST
 	select BR2_PACKAGE_XLIB_LIBXPM
+	select BR2_PACKAGE_XLIB_LIBXRENDER
+	select BR2_PACKAGE_XLIB_LIBXEXT
 	help
 	  Handwriting recognition for X
 
package/xstroke/xstroke-fix-link-issues.patch new file +35 -0
new file mode 100644
index 0000000..9a6d71e
@@ -0,0 +1,35 @@
+Fix link issues by linking against all needed libraries
+
+Since gcc 4.6, all libraries that are directly used must be explicitly
+passed on the command line. In the case of xstroke, linking against
+Xrender, Xext and dl was missing. For the first two, they are added
+through addition PKG_CHECK_MODULES() checks, for the latter, it is
+added next to -lm and -lpthread in Makefile.am.
+
+Signed-off-by: Thomas Petazzoni <[email protected]>
+Index: b/Makefile.am
+===================================================================
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -40,7 +40,7 @@
+ BUILT_SOURCES = rec_parse.h rec_lex.h rec_lex.c
+ AM_YFLAGS = -d
+ 
+-xstroke_LDADD = @XSTROKE_LIBS@ -lm -lpthread $(X_LIBS) -lXpm -lXtst
++xstroke_LDADD = @XSTROKE_LIBS@ -ldl -lm -lpthread $(X_LIBS) -lXpm -lXtst
+ AM_CFLAGS = @XSTROKE_CFLAGS@ -DXSTROKE_CONF_DIR='"$(sysconfdir)/xstroke"' $(X_CFLAGS)
+ 
+ EXTRA_DIST = xstroke_active.xpm xstroke_inactive.xpm etc/alphabet
+Index: b/configure.ac
+===================================================================
+--- a/configure.ac
++++ b/configure.ac
+@@ -26,7 +26,7 @@
+ AC_CHECK_FUNCS([gettimeofday localtime_r])
+ 
+ AC_PATH_XTRA
+-PKG_CHECK_MODULES(XSTROKE, xft)
++PKG_CHECK_MODULES(XSTROKE, [xft xrender xext])
+ 
+ AC_CONFIG_FILES([Makefile])
+ AC_OUTPUT
package/xstroke/xstroke.mk +2 -1
index 3459545..83f347d 100644
@@ -7,7 +7,8 @@ XSTROKE_VERSION = 0.6
 XSTROKE_SOURCE = xstroke-$(XSTROKE_VERSION).tar.gz
 XSTROKE_SITE = http://mirror.egtvedt.no/avr32linux.org/twiki/pub/Main/XStroke
 
-XSTROKE_DEPENDENCIES = xlib_libXft xlib_libXtst xlib_libXpm
+XSTROKE_DEPENDENCIES = xlib_libXft xlib_libXtst xlib_libXpm xlib_libXrender xlib_libXext
+XSTROKE_AUTORECONF = YES
 
 $(eval $(autotools-package))
 
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 2/2 xstroke: mark as deprecated

xstroke is just a tarball on the avr32linux.org site, the 0.6 version has been released in April 2004, so we can consider the upstream to be dead. So let's mark this package as deprecated.

---
 package/xstroke/Config.in |    2 ++
 1 file changed, 2 insertions(+)
package/xstroke/Config.in +2 -0
index 1269934..4f3f5f6 100644
@@ -1,6 +1,8 @@
 config BR2_PACKAGE_XSTROKE
 	bool "xstroke"
 	depends on BR2_PACKAGE_XORG7
+	# dead upstream, probably not many users
+	depends on BR2_DEPRECATED
 	select BR2_PACKAGE_XLIB_LIBXFT
 	select BR2_PACKAGE_XLIB_LIBXTST
 	select BR2_PACKAGE_XLIB_LIBXPM
Signature · 1 line
1.7.9.5
#2 lore raw

PATCH 1/2 xstroke: fix link issue

In reply to Thomas Petazzoni
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

Thomas> The allyespackageconfig builds have trigerred a link issue on Thomas> xstroke. In fact, xstroke must be linked against Xrender, Xext and dl Thomas> in addition to the other libraries it was already be linked Thomas> against. We fix that by adding a patch that modifies configure.ac and Thomas> Makefile.am, and enabling autoreconf for this package.

Committed both, thanks.

Signature · 1 line
Bye, Peter Korsgaard