From d4a10cd403a4afaa5145bb99d4ee741c9db0a980 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Aur=C3=A9lien=20Larcher?= Date: Thu, 4 Feb 2016 18:56:55 +0100 Subject: [PATCH] Add libXpm 3.5.11 from x-s12 --- components/x11/libXpm/Makefile | 63 +++++++++++++++++++++++++++ components/x11/libXpm/libXpm.license | 70 ++++++++++++++++++++++++++++++ components/x11/libXpm/libXpm.p5m | 39 +++++++++++++++++ components/x11/libXpm/mapfile-vers | 64 +++++++++++++++++++++++++++ components/x11/libXpm/patches/setuid.patch | 47 ++++++++++++++++++++ components/x11/libXpm/srcs/man/libXpm.3lib | 56 ++++++++++++++++++++++++ 6 files changed, 339 insertions(+) create mode 100644 components/x11/libXpm/Makefile create mode 100644 components/x11/libXpm/libXpm.license create mode 100644 components/x11/libXpm/libXpm.p5m create mode 100644 components/x11/libXpm/mapfile-vers create mode 100644 components/x11/libXpm/patches/setuid.patch create mode 100644 components/x11/libXpm/srcs/man/libXpm.3lib diff --git a/components/x11/libXpm/Makefile b/components/x11/libXpm/Makefile new file mode 100644 index 000000000..1dcd467c2 --- /dev/null +++ b/components/x11/libXpm/Makefile @@ -0,0 +1,63 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright 2015 Aurelien Larcher +# + +include ../../../make-rules/shared-macros.mk + +COMPONENT_NAME= libXpm +COMPONENT_VERSION= 3.5.11 +COMPONENT_FMRI= x11/library/libxpm +COMPONENT_CLASSIFICATION= System/X11 +COMPONENT_SUMMARY= libXpm - X Pixmap library +COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION) +COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.bz2 +COMPONENT_ARCHIVE_HASH= \ + sha256:c5bdafa51d1ae30086fac01ab83be8d47fe117b238d3437f8e965434090e041c +COMPONENT_ARCHIVE_URL= \ + http://www.x.org/releases/individual/lib/$(COMPONENT_ARCHIVE) +COMPONENT_PROJECT_URL = http://www.x.org/ +COMPONENT_LICENSE= MIT License +COMPONENT_LICENSE_FILE= libXpm.license + +include $(WS_TOP)/make-rules/prep.mk +include $(WS_TOP)/make-rules/configure.mk +include $(WS_TOP)/make-rules/ips.mk + +PATH=/usr/gnu/bin:/usr/bin + +COMPONENT_PREP_ACTION = ( cp -r $(COMPONENT_DIR)/srcs/* $(SOURCE_DIR) && \ + cd $(@D) && autoreconf -f -i ) + +CONFIGURE_DEFAULT_DIRS=no +CONFIGURE_OPTIONS+= --mandir=$(CONFIGURE_MANDIR) +CONFIGURE_OPTIONS+= --bindir=$(USRBINDIR$(BITS)) +CONFIGURE_OPTIONS+= --libdir=$(CONFIGURE_LIBDIR.$(BITS)) +CONFIGURE_OPTIONS+= --sbindir=$(USRSBINDIR$(BITS)) +CONFIGURE_OPTIONS+= --disable-static +CONFIGURE_OPTIONS+= --enable-shared + +LD_OPTIONS_SO += -M$(COMPONENT_DIR)/mapfile-vers + + +build: $(BUILD_32_and_64) + +install: $(INSTALL_32_and_64) + +test: $(NO_TESTS) + + +REQUIRED_PACKAGES += system/library +REQUIRED_PACKAGES += x11/library/libx11 +REQUIRED_PACKAGES += x11/library/libxext +REQUIRED_PACKAGES += x11/library/toolkit/libxt diff --git a/components/x11/libXpm/libXpm.license b/components/x11/libXpm/libXpm.license new file mode 100644 index 000000000..585af0b8f --- /dev/null +++ b/components/x11/libXpm/libXpm.license @@ -0,0 +1,70 @@ +Copyright (C) 1989-95 GROUPE BULL + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +GROUPE BULL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of GROUPE BULL shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from GROUPE BULL. + +Copyright (C) 1998 Arnaud LE HORS + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +Arnaud LE HORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of Arnaud LE HORS shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from Arnaud LE HORS. + +Copyright (C) 1996 Lorens Younes + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +Lorens Younes BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of Lorens Younes shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from Lorens Younes. + + diff --git a/components/x11/libXpm/libXpm.p5m b/components/x11/libXpm/libXpm.p5m new file mode 100644 index 000000000..f08df9b88 --- /dev/null +++ b/components/x11/libXpm/libXpm.p5m @@ -0,0 +1,39 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# +# Copyright 2016 Aurelien Larcher +# + +set name=pkg.fmri value=pkg:/$(COMPONENT_FMRI)@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION) +set name=pkg.summary value="$(COMPONENT_SUMMARY)" +set name=info.classification value="$(COMPONENT_CLASSIFICATION)" +set name=info.upstream-url value=$(COMPONENT_PROJECT_URL) +set name=info.source-url value=$(COMPONENT_ARCHIVE_URL) +set name=org.opensolaris.consolidation value=$(CONSOLIDATION) + +license $(COMPONENT_LICENSE_FILE) license='$(COMPONENT_LICENSE)' + +file path=usr/bin/$(MACH32)/cxpm +file path=usr/bin/$(MACH32)/sxpm +file path=usr/bin/$(MACH64)/cxpm +file path=usr/bin/$(MACH64)/sxpm +file path=usr/include/X11/xpm.h +link path=usr/lib/$(MACH64)/libXpm.so target=libXpm.so.4.11.0 +link path=usr/lib/$(MACH64)/libXpm.so.4 target=libXpm.so.4.11.0 +file path=usr/lib/$(MACH64)/libXpm.so.4.11.0 +file path=usr/lib/$(MACH64)/pkgconfig/xpm.pc +link path=usr/lib/libXpm.so target=libXpm.so.4.11.0 +link path=usr/lib/libXpm.so.4 target=libXpm.so.4.11.0 +file path=usr/lib/libXpm.so.4.11.0 +file path=usr/lib/pkgconfig/xpm.pc +file path=usr/share/man/man1/cxpm.1 +file path=usr/share/man/man1/sxpm.1 diff --git a/components/x11/libXpm/mapfile-vers b/components/x11/libXpm/mapfile-vers new file mode 100644 index 000000000..7f2b0d882 --- /dev/null +++ b/components/x11/libXpm/mapfile-vers @@ -0,0 +1,64 @@ +# +# Copyright (c) 2006, 2007, Oracle and/or its affiliates. All rights reserved. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice (including the next +# paragraph) shall be included in all copies or substantial portions of the +# Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# +# + +SUNW_1.1 { + global: + XpmAttributesSize; + XpmCreateImageFromData; + XpmCreateBufferFromPixmap; + XpmCreateDataFromImage; + XpmFreeAttributes; + XpmCreateXpmImageFromData; + XpmReadFileToImage; + XpmFreeExtensions; + XpmCreateXpmImageFromBuffer; + XpmCreatePixmapFromXpmImage; + XpmWriteFileFromImage; + XpmGetErrorString; + XpmCreateImageFromBuffer; + XpmCreateBufferFromXpmImage; + XpmFreeXpmImage; + XpmCreatePixmapFromData; + XpmReadFileToBuffer; + XpmLibraryVersion; + XpmCreateImageFromXpmImage; + XpmWriteFileFromXpmImage; + XpmFreeXpmInfo; + XpmCreateDataFromPixmap; + XpmWriteFileFromBuffer; + XpmReadFileToXpmImage; + XpmCreateXpmImageFromImage; + XpmCreatePixmapFromBuffer; + XpmReadFileToPixmap; + XpmReadFileToData; + XpmCreateXpmImageFromPixmap; + XpmWriteFileFromPixmap; + XpmWriteFileFromData; + XpmCreateBufferFromImage; + XpmCreateDataFromXpmImage; + XpmFree; + local: + *; +}; + diff --git a/components/x11/libXpm/patches/setuid.patch b/components/x11/libXpm/patches/setuid.patch new file mode 100644 index 000000000..c3f9b0ba2 --- /dev/null +++ b/components/x11/libXpm/patches/setuid.patch @@ -0,0 +1,47 @@ +# +# Copyright (c) 2006, 2007, Oracle and/or its affiliates. All rights reserved. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice (including the next +# paragraph) shall be included in all copies or substantial portions of the +# Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# +# + +Additional security checks for setuid programs that X.Org upstream doesn't +have yet. + +diff -urp -x '*~' -x '*.orig' src/RdFToI.c src/RdFToI.c +--- ./src/RdFToI.c 2010-10-06 21:14:06.000000000 -0700 ++++ ./src/RdFToI.c 2011-02-11 17:00:23.916602294 -0800 +@@ -161,7 +161,15 @@ xpmPipeThrough( + goto err; + if ( 0 == pid ) + { +- execlp(cmd, cmd, arg1, (char *)NULL); ++/* #ifdef SUNSOFT */ ++ closefrom(3); ++ if (issetugid()) { ++ char commandpath[32] = "/usr/bin/"; ++ strlcat(commandpath, cmd, sizeof(commandpath)); ++ execl(commandpath, cmd, arg1, NULL); ++ } else ++/* #endif */ ++ execlp(cmd, cmd, arg1, NULL); + perror(cmd); + goto err; + } diff --git a/components/x11/libXpm/srcs/man/libXpm.3lib b/components/x11/libXpm/srcs/man/libXpm.3lib new file mode 100644 index 000000000..f486bcd28 --- /dev/null +++ b/components/x11/libXpm/srcs/man/libXpm.3lib @@ -0,0 +1,56 @@ +'\" t +.\" +.\" Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. +.\" +.\" Permission is hereby granted, free of charge, to any person obtaining a +.\" copy of this software and associated documentation files (the "Software"), +.\" to deal in the Software without restriction, including without limitation +.\" the rights to use, copy, modify, merge, publish, distribute, sublicense, +.\" and/or sell copies of the Software, and to permit persons to whom the +.\" Software is furnished to do so, subject to the following conditions: +.\" +.\" The above copyright notice and this permission notice (including the next +.\" paragraph) shall be included in all copies or substantial portions of the +.\" Software. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +.\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +.\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +.\" THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +.\" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +.\" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +.\" DEALINGS IN THE SOFTWARE. +.\" +.TH libXpm 3LIB "2 May 2014" __xorgversion__ +.SH NAME +libXpm \- X Pixmap (XPM) image file format library +.SH SYNOPSIS +.LP +.nf +#include + +.SH DESCRIPTION +.LP +.B libXpm +provides functions to read, write, and display images in the X Pixmap (XPM) +format. +.LP +Documentation of the libXpm API may be found in the XPM Manual, delivered +in +.BR /usr/share/doc/libXpm/xpm.ps . + +.SH FILES +.TP 30 +.B /usr/lib/libXpm.so.4 +32-bit shared object +.TP 30 +.B /usr/lib/64/libXpm.so.4 +64-bit shared object +.TP 30 +.B /usr/share/doc/libXpm/xpm.ps +XPM Manual + +.SH SEE ALSO +.LP +.BR cxpm (1), +.BR sxpm (1) -- 2.11.4.GIT