summaryrefslogtreecommitdiff
path: root/graphics/libGL/files/patch-src_mapi_shared-glapi_Makefile.in
blob: a82a748e7b10a354f698260f170d575e6f30f9c3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- src/mapi/shared-glapi/Makefile.in.orig	2013-06-27 00:42:45.000000000 +0200
+++ src/mapi/shared-glapi/Makefile.in	2013-06-27 00:43:25.000000000 +0200
@@ -889,9 +889,14 @@
 
 all-local: libglapi.la
 	$(MKDIR_P) $(top_builddir)/$(LIB_DIR)
-	ln -f .libs/libglapi.so.0.0.0 $(top_builddir)/$(LIB_DIR)/libglapi.so.0.0.0
-	ln -sf libglapi.so.0.0.0 $(top_builddir)/$(LIB_DIR)/libglapi.so.0
-	ln -sf libglapi.so.0 $(top_builddir)/$(LIB_DIR)/libglapi.so
+	base=$(basename $<);					\
+	dlname=$$(grep dlname= .libs/$< | cut -d "'" -f 2);	\
+	ver=$$(grep current= .libs/$< | cut -d "=" -f 2);	\
+	ln -f .libs/$$dlname $(top_builddir)/$(LIB_DIR)/$$dlname; \
+	if [ ! -f $(top_builddir)/$(LIB_DIR)/$$base.so.$$ver ]; then \
+	  ln -sf $$dlname $(top_builddir)/$(LIB_DIR)/$$base.so.$$ver; \
+	fi;							\
+	ln -sf $$base.so.$$ver $(top_builddir)/$(LIB_DIR)/$$base.so
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.