// in Makefile.am and cygwin

Messages in english

Modérateur : xcasadmin

frederic han
Messages : 1137
Inscription : dim. mai 20, 2007 7:09 am
Localisation : Paris
Contact :

// in Makefile.am and cygwin

Message par frederic han » mer. févr. 08, 2017 10:58 am

Hello bernard,
in Makefile.am there pathes like this:

Code : Tout sélectionner

cp config.h $(DESTDIR)/$(includedir)/giac
which seems to give 2 consecutive slahes and trouble on cygwin for make install:
cf: https://trac.sagemath.org/ticket/22315

while changing to:

Code : Tout sélectionner

cp config.h $(DESTDIR)$(includedir)/giac
solves the problem. Do you have any particular reason for this /? or could you change it?

Code : Tout sélectionner

diff --git a/build/pkgs/giac/patches/autotools/ticket-22315-autotools.patch b/build/pkgs/giac/patches/autotools/ticket-22315-autotools.patch
new file mode 100644
index 0000000..b660982
--- /dev/null
+++ b/build/pkgs/giac/patches/autotools/ticket-22315-autotools.patch
@@ -0,0 +1,48 @@
+diff -ruN a/Makefile.am b/Makefile.am
+--- a/Makefile.am	2017-02-06 16:01:16.484367300 +0100
++++ b/Makefile.am	2017-02-06 16:06:28.013569300 +0100
+@@ -8,18 +8,18 @@
+ ## FIXME: installing autoconf-generated config.h is just PLAIN WRONG.
+ 
+ install-exec-hook:
+-	cp config.h $(DESTDIR)/$(includedir)/giac
+-	./mkinstalldirs $(DESTDIR)/$(prefix)/share/
+-	./mkinstalldirs $(DESTDIR)/$(prefix)/share/pixmaps
+-	cp xcas.xpm $(DESTDIR)/$(prefix)/share/pixmaps/xcas.xpm
+-	./mkinstalldirs $(DESTDIR)/$(prefix)/share/applications
+-	cp xcas.desktop $(DESTDIR)/$(prefix)/share/applications/xcas.desktop
+-	./mkinstalldirs $(DESTDIR)/$(prefix)/share/application-registry
+-	cp xcas.applications $(DESTDIR)/$(prefix)/share/application-registry/xcas.applications
+-	./mkinstalldirs $(DESTDIR)/$(prefix)/share/icons/
+-	./mkinstalldirs $(DESTDIR)/$(prefix)/share/icons/hicolor
+-	for SIZE in 256 128 64 32 16; do ./mkinstalldirs $(DESTDIR)/$(prefix)/share/icons/hicolor/$${SIZE}x$${SIZE} && ./mkinstalldirs $(DESTDIR)/$(prefix)/share/icons/hicolor/$${SIZE}x$${SIZE}/apps && cp icons/xcas_$${SIZE}.png $(DESTDIR)/$(prefix)/share/icons/hicolor/$${SIZE}x$${SIZE}/apps/xcas.png; done
+-	for SIZE in 256 128 64 32 16; do ./mkinstalldirs $(DESTDIR)/$(prefix)/share/icons/hicolor/$${SIZE}x$${SIZE}/mimetypes && cp icons/x-xcas_$${SIZE}.png $(DESTDIR)/$(prefix)/share/icons/hicolor/$${SIZE}x$${SIZE}/mimetypes/application-x-xcas.png;  done
++	cp config.h $(DESTDIR)$(includedir)/giac
++	./mkinstalldirs $(DESTDIR)$(prefix)/share/
++	./mkinstalldirs $(DESTDIR)$(prefix)/share/pixmaps
++	cp xcas.xpm $(DESTDIR)$(prefix)/share/pixmaps/xcas.xpm
++	./mkinstalldirs $(DESTDIR)$(prefix)/share/applications
++	cp xcas.desktop $(DESTDIR)$(prefix)/share/applications/xcas.desktop
++	./mkinstalldirs $(DESTDIR)$(prefix)/share/application-registry
++	cp xcas.applications $(DESTDIR)$(prefix)/share/application-registry/xcas.applications
++	./mkinstalldirs $(DESTDIR)$(prefix)/share/icons/
++	./mkinstalldirs $(DESTDIR)$(prefix)/share/icons/hicolor
++	for SIZE in 256 128 64 32 16; do ./mkinstalldirs $(DESTDIR)$(prefix)/share/icons/hicolor/$${SIZE}x$${SIZE} && ./mkinstalldirs $(DESTDIR)$(prefix)/share/icons/hicolor/$${SIZE}x$${SIZE}/apps && cp icons/xcas_$${SIZE}.png $(DESTDIR)$(prefix)/share/icons/hicolor/$${SIZE}x$${SIZE}/apps/xcas.png; done
++	for SIZE in 256 128 64 32 16; do ./mkinstalldirs $(DESTDIR)$(prefix)/share/icons/hicolor/$${SIZE}x$${SIZE}/mimetypes && cp icons/x-xcas_$${SIZE}.png $(DESTDIR)$(prefix)/share/icons/hicolor/$${SIZE}x$${SIZE}/mimetypes/application-x-xcas.png;  done
+ 
+ ACLOCAL_AMFLAGS = -I m4
+ 
+diff -ruN a/src/Makefile.am b/src/Makefile.am
+--- a/src/Makefile.am	2017-02-06 16:01:51.663379800 +0100
++++ b/src/Makefile.am	2017-02-06 16:01:25.730657700 +0100
+@@ -85,8 +85,8 @@
+ bin_SCRIPTS = pgiac
+ 
+ install-exec-hook:
+-	rm -f $(DESTDIR)$(bindir)/cas_help
+-	mv $(DESTDIR)/$(bindir)/aide$(EXEEXT) $(DESTDIR)$(bindir)/cas_help
++	rm -f $(DESTDIR)$(bindir)/cas_help$(EXEEXT)
++	mv $(DESTDIR)$(bindir)/aide$(EXEEXT) $(DESTDIR)$(bindir)/cas_help
+ 	ln -sf cas_help $(DESTDIR)$(bindir)/en_cas_help
+ 	ln -sf cas_help $(DESTDIR)$(bindir)/es_cas_help
+ 	ln -sf cas_help $(DESTDIR)$(bindir)/fr_cas_help

parisse
Messages : 5739
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: // in Makefile.am and cygwin

Message par parisse » jeu. févr. 09, 2017 7:06 am

I will make the following changes in Makefile.am and src/Makefile.am starting from version 1.2.3-27:
replace $(DESTDIR)/$(prefix) by $(DESTDIR)$(prefix)

Répondre