libs-gui/Panels/GNUmakefile.postamble
Sebastian Reitenbach 857c173d03 Don't misuse libgnustep-gui_INTERFACE_VERSION to define Resource Install paths
$(GNUSTEP_INSTANCE)_INTERFACE_VERSION is used in gnustep-make to define
the version of the shared object.

As a packager, there might be various reasons to
override the $(GNUSTEP_INSTANCE)_INTERFACE_VERSION
in order to control the library version.

So I do for gnustep-gui on OpenBSD packages. The problem here is, that
the libgnustep-gui_INTERFACE_VERSION is additionally used to specify the path
where resources like Panels, Localizations etc. get installed, however,
in Source/NSApplication.m, the use of
GNUSTEP_GUI_MAJOR_VERSION.GNUSTEP_GUI_MINOR_VERSION

As long as the libgnustep-gui_INTERFACE_VERSION is not overridden with
some other value, everything is fine. However, as in my case, Applications
aren't able to find the Panels/Translations provided by -gui anymore.

Decided to just remove the definition of libgnustep-gui_INTERFACE_VERSION
in these three Makefiles, as it was only used once, and used the
GNUSTEP_GUI_MAJOR_VERSION.GNUSTEP_GUI_MINOR_VERSION directly.

Alternatively, libgnustep-gui_INTERFACE_VERSION in these Makefiles
could could have been renamed to avoid this conflict.
2022-08-19 15:54:41 +02:00

73 lines
2.5 KiB
Text

#
# GNUmakefile.postamble
#
# Copyright (C) 2001 Free Software Foundation, Inc.
#
# Written: Adam Fedor <fedor@gnu.org>
# Date: Oct 2001
#
# This file is part of the GNUstep Base Library.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; see the file COPYING.LIB.
# If not, see <http://www.gnu.org/licenses/> or write to the
# Free Software Foundation, 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
# TODO: extend resource-set.make so that this can be done easily with
# it.
include ../Version
POSTAMBLE_INSTALL_DIR = $(GNUSTEP_LIBRARY)/Libraries/gnustep-gui/Versions/$(GNUSTEP_GUI_MAJOR_VERSION).$(GNUSTEP_GUI_MINOR_VERSION)/Resources
# Things to do after installing
after-install::
ifneq ($(strip $(LOCALIZED_RESOURCE_FILES)),)
$(ECHO_NOTHING)echo "Copying localized resources into system..."; \
for l in $(LANGUAGES); do \
if [ ! -d $(POSTAMBLE_INSTALL_DIR)/$$l.lproj ]; then \
$(MKDIRS) $(POSTAMBLE_INSTALL_DIR)/$$l.lproj; \
fi; \
for f in $(LOCALIZED_RESOURCE_FILES); do \
if [ -f $$l.lproj/$$f ]; then \
cp -r $$l.lproj/$$f $(POSTAMBLE_INSTALL_DIR)/$$l.lproj; \
fi; \
done; \
done$(END_ECHO)
endif
ifneq ($(strip $(LOCALIZED_RESOURCE_COMPONENTS)),)
$(ECHO_NOTHING)echo "Copying localized components into system..."; \
for l in $(LANGUAGES); do \
if [ ! -d $(POSTAMBLE_INSTALL_DIR)/$$l.lproj ]; then \
$(MKDIRS) $(POSTAMBLE_INSTALL_DIR)/$$l.lproj; \
fi; \
for f in $(LOCALIZED_RESOURCE_COMPONENTS); do \
if [ -d $$l.lproj/$$f ]; then \
cp -r $$l.lproj/$$f $(POSTAMBLE_INSTALL_DIR)/$$l.lproj; \
rm -rf $(POSTAMBLE_INSTALL_DIR)/$$l.lproj/$$f/.svn; \
fi; \
done; \
done$(END_ECHO)
endif
# Things to do after uninstalling
after-uninstall::
ifneq ($(strip $(LOCALIZED_RESOURCE_FILES)$(LOCALIZED_RESOURCE_COMPONENTS)),)
$(ECHO_NOTHING)for l in $(LANGUAGES); do \
if [ -d $$l.lproj ]; then \
rm -rf $(POSTAMBLE_INSTALL_DIR)/$$l.lproj; \
fi; \
done$(END_ECHO)
endif