PDCurses icon indicating copy to clipboard operation
PDCurses copied to clipboard

Possible X11 Makefile.in enhancement for DESTDIR

Open marXtevens opened this issue 4 years ago • 1 comments

I wanted to build the X11 version PDCurses and then distribute it to other VMs I have running. GNU documentation pointed me to DESTDIR in make, and a fair amount of testing got me to the attached Makefile.in with these changes. I ended up adding support for DESTDIR, and for uninstall (because I got tired of manually rm'ing all the files installed.) Is there anything else needed?

[xmas@reindeer x11]$ diff Makefile.in Makefile.in.2021-01-20.xmas 8c8 < PDCURSES_SRCDIR = $(CURDIR)/.. --- > PDCURSES_SRCDIR = .. 60,63c60,63 < $(INSTALL) -d -m 755 $(DESTDIR)$(libdir) < $(INSTALL) -d -m 755 $(DESTDIR)$(bindir) < $(INSTALL) -d -m 755 $(DESTDIR)$(includedir) < $(INSTALL) -d -m 755 $(DESTDIR)$(includedir)/xcurses --- > $(INSTALL) -d -m 755 $(libdir) > $(INSTALL) -d -m 755 $(bindir) > $(INSTALL) -d -m 755 $(includedir) > $(INSTALL) -d -m 755 $(includedir)/xcurses 65c65 < $(DESTDIR)$(includedir)/xcurses/curses.h --- > $(includedir)/xcurses/curses.h 67,80c67,72 < $(DESTDIR)$(includedir)/xcurses/panel.h < $(INSTALL) -c -m 644 $(osdir)/libXCurses.a $(DESTDIR)$(libdir)/libXCurses.a < -$(RANLIB) $(DESTDIR)$(libdir)/libXCurses.a < -$(INSTALL) -c -m 644 $(osdir)/$(SHLPRE)$(SHLFILE)$(SHLPST)
< $(DESTDIR)$(libdir)/$(SHLPRE)$(SHLFILE)$(SHLPST) < $(INSTALL) -c -m 755 $(osdir)/xcurses-config $(DESTDIR)$(bindir)/xcurses-config < < uninstall: < -rm -f $(DESTDIR)$(includedir)/xcurses/curses.h < -rm -f $(DESTDIR)$(includedir)/xcurses/panel.h < -rmdir $(DESTDIR)$(includedir)/xcurses < -rm -f $(DESTDIR)$(libdir)/libXCurses.a < -rm -f $(DESTDIR)$(libdir)/$(SHLPRE)$(SHLFILE)$(SHLPST) < -rm -f $(DESTDIR)$(bindir)/xcurses-config --- > $(includedir)/xcurses/panel.h > $(INSTALL) -c -m 644 $(osdir)/libXCurses.a $(libdir)/libXCurses.a > -$(RANLIB) $(libdir)/libXCurses.a > -$(INSTALL) -c -m 755 $(osdir)/$(SHLPRE)$(SHLFILE)$(SHLPST)
> $(libdir)/$(SHLPRE)$(SHLFILE)$(SHLPST) > $(INSTALL) -c -m 755 $(osdir)/xcurses-config $(bindir)/xcurses-config [xmas@reindeer x11]$

Makefile.in.zip

... Mark A. Stevens

marXtevens avatar Jan 21 '21 17:01 marXtevens

Not sure if it's related but, trying to package the x11 port proves challenging as the current build system doesn't seem to properly handle DESTDIR. When trying to install to an empty DESTDIR for package management, it complains about not having permissions to change /usr/lib.

Thanks for the patch! This new install rule successfully installs to DESTDIR.

astralchan avatar May 30 '21 08:05 astralchan