Skip to content

Commit

Permalink
[Libxpm] ADD new port (microsoft#25935)
Browse files Browse the repository at this point in the history
* first batch of xwindow PR ports - up to dbus

* first batch of xwindow PR ports - up to dbus

* format manifest

* version stuff

* remove if block

* version stuff

* fix xcb hash

* fix xproto dependency on meson blocking cross builds

* adjust message

* use X11_xcb_LIB

* version stuff

* put xlib arm64-windows on baseline

* fix dbus on osx and linux

* version stuff

* forget to set the value

* fix --export-dynamic on osx

* version dbus

* ci-retrigger

* add license (needs tool update)

* version adjustments

* version update

* Added libxml port.

* remove unnecessary comments

* v db

* Remove port version as it's initial port.

* Added baseline version

* Support only for windows and static

* Allowed building debug version

* update versions

* Update ports/libxpm/portfile.cmake

Co-authored-by: Thomas1664 <[email protected]>

* Added new lines

* Update ports/libxpm/vcpkg.json

Co-authored-by: Thomas1664 <[email protected]>

* Update ports/libxpm/portfile.cmake

Co-authored-by: Thomas1664 <[email protected]>

* Update ports/libxpm/vcpkg.json

Co-authored-by: Thomas1664 <[email protected]>

* Regenerated versions

* Update ports/libxpm/vcpkg.json

Co-authored-by: JonLiu1993 <[email protected]>

* Libxpm is taken from gitlab now.

* Apply suggestions from code review

Co-authored-by: Billy O'Neal <[email protected]>

* nitpicks

* rename xau to libxau

* use vcpkg_install_copyright and silence usage

* xtrans silence usage

* format-manifest

* v db

* make license null for ports without exact match

* xdmcp rename to libxdmcp

* merge x11 wrapper into xlib
rename xlib to libx11 to avoid a metaport

* v db

* missed dbus depending on x11.

* v db

* Update scripts/ci.baseline.txt

* Initial switch to make

* Added required dependencies

* Build fixed

* Updated versions

* Update version database

* format

* version

* Dropped not used code

* versions

* Enabled support for linux

* versions

Co-authored-by: Alexander Neumann <[email protected]>
Co-authored-by: Alexander Neumann <[email protected]>
Co-authored-by: LilyWangLL <[email protected]>
Co-authored-by: Alexander Neumann <[email protected]>
Co-authored-by: Neumann-A <[email protected]>
Co-authored-by: JackBoosY <[email protected]>
Co-authored-by: Thomas1664 <[email protected]>
Co-authored-by: JonLiu1993 <[email protected]>
Co-authored-by: Billy O'Neal <[email protected]>
  • Loading branch information
10 people authored Sep 8, 2022
1 parent 0c1a8fe commit 3d802bb
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 0 deletions.
36 changes: 36 additions & 0 deletions ports/libxpm/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
if(NOT X_VCPKG_FORCE_VCPKG_X_LIBRARIES AND NOT VCPKG_TARGET_IS_WINDOWS)
message(STATUS "Utils and libraries provided by '${PORT}' should be provided by your system! Install the required packages or force vcpkg libraries by setting X_VCPKG_FORCE_VCPKG_X_LIBRARIES in your triplet")
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
else()
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)

vcpkg_from_gitlab(
GITLAB_URL https://gitlab.freedesktop.org/xorg
OUT_SOURCE_PATH SOURCE_PATH
REPO lib/libxpm
REF libXpm-3.5.13
SHA512 250c8bf672789a81cfa258a516d40936f48a56cfaee94bf3f628e3f4a462bdd90eaaea787d66daf09ce4809b89c3eaea1e0771de03a6d7f1a59b31cc82be1c44
PATCHES remove_strings_h.patch
)

set(ENV{ACLOCAL} "aclocal -I \"${CURRENT_INSTALLED_DIR}/share/xorg/aclocal/\"")

vcpkg_configure_make(
SOURCE_PATH "${SOURCE_PATH}"
AUTOCONFIG
)

vcpkg_install_make()

vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES pthread)

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")

if(VCPKG_LIBRARY_LINKAGE STREQUAL static OR NOT VCPKG_TARGET_IS_WINDOWS)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
endif()

# # Handle copyright
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
endif()
16 changes: 16 additions & 0 deletions ports/libxpm/remove_strings_h.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
diff --git a/src/XpmI.h b/src/XpmI.h
index 4360ad3b9..a8d78b0ba 100644
--- a/src/XpmI.h
+++ b/src/XpmI.h
@@ -325,8 +325,10 @@ FUNC(xpmstrcasecmp, int, (char *s1, char *s2));
#else
#undef xpmstrcasecmp
#define xpmstrcasecmp strcasecmp
+#if !defined(_MSC_VER)
#include <strings.h>
#endif
+#endif

FUNC(xpmatoui, unsigned int,
(char *p, unsigned int l, unsigned int *ui_return));

17 changes: 17 additions & 0 deletions ports/libxpm/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "libxpm",
"version": "3.5.11",
"description": "XPM format pixmap library",
"homepage": "https://github.com/freedesktop/libXpm",
"license": "MIT",
"supports": "windows | linux",
"dependencies": [
"libx11",
{
"name": "vcpkg-cmake",
"host": true
},
"xorg-macros",
"xproto"
]
}
4 changes: 4 additions & 0 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -4348,6 +4348,10 @@
"baseline": "4.4.1",
"port-version": 8
},
"libxpm": {
"baseline": "3.5.11",
"port-version": 0
},
"libxslt": {
"baseline": "1.1.35",
"port-version": 2
Expand Down
9 changes: 9 additions & 0 deletions versions/l-/libxpm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "d72a962542b4175f99f5127b477866f2a5eba510",
"version": "3.5.11",
"port-version": 0
}
]
}

0 comments on commit 3d802bb

Please sign in to comment.