2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL"), version 1.0.
4 # You may only use this file in accordance with the terms of version
7 # A full copy of the text of the CDDL should have accompanied this
8 # source. A copy of the CDDL is also available via the Internet at
9 # http://www.illumos.org/license/CDDL.
13 # Copyright 2016 Jim Klimov
18 include ..
/..
/..
/make-rules
/shared-macros.mk
20 COMPONENT_NAME
= physfs
21 COMPONENT_VERSION
= 2.0.3
23 COMPONENT_FMRI
= library
/$(COMPONENT_NAME
)
24 COMPONENT_SUMMARY
= PhysicsFS is a library to provide abstract access to various archives and limit write-access scope
25 COMPONENT_SRC
= $(COMPONENT_NAME
)-$(COMPONENT_VERSION
)
26 COMPONENT_ARCHIVE
= $(COMPONENT_SRC
).
tar.bz2
27 COMPONENT_ARCHIVE_HASH
= \
28 sha256
:ca862097c0fb451f2cacd286194d071289342c107b6fe69079c079883ff66b69
29 COMPONENT_ARCHIVE_URL
= \
30 http
://icculus.org
/physfs
/downloads
/$(COMPONENT_ARCHIVE
)
31 COMPONENT_PROJECT_URL
= http
://icculus.org
/physfs
/
32 COMPONENT_CLASSIFICATION
=System
/Libraries
33 # LGPL is pulled by 7z/lzma support, otherwise PhysicsFS is zlib-licensed
34 COMPONENT_LICENSE
= ZLIB
,LGPL
35 COMPONENT_LICENSE_FILE
= LICENSE.txt
37 include $(WS_MAKE_RULES
)/common.mk
39 CXXFLAGS
.32=-D_FILE_OFFSET_BITS
=64 -D_LARGEFILE_SOURCE
40 CFLAGS
.32=-D_FILE_OFFSET_BITS
=64 -D_LARGEFILE_SOURCE
42 CXXFLAGS
+=$(CXXFLAGS.
$(BITS
))
43 CFLAGS
+=$(CFLAGS.
$(BITS
))
45 CMAKE_OPTIONS
+= -D PHYSFS_BUILD_STATIC
=OFF
46 CMAKE_OPTIONS
+= -D PHYSFS_BUILD_SHARED
=ON
48 # Use a definitive list of what we want to deliver
49 # (NOTE: dependency pkgs must be present for build)
50 CMAKE_OPTIONS
+= -D PHYSFS_ARCHIVE_ZIP
=ON
51 CMAKE_OPTIONS
+= -D PHYSFS_ARCHIVE_7Z
=ON
52 CMAKE_OPTIONS
+= -D PHYSFS_ARCHIVE_GRP
=ON
53 CMAKE_OPTIONS
+= -D PHYSFS_ARCHIVE_WAD
=ON
54 CMAKE_OPTIONS
+= -D PHYSFS_ARCHIVE_HOG
=ON
55 CMAKE_OPTIONS
+= -D PHYSFS_ARCHIVE_MVL
=ON
56 CMAKE_OPTIONS
+= -D PHYSFS_ARCHIVE_QPAK
=ON
58 # PHYSFS_HAVE_CDROM_SUPPORT detection requires mntent.h or sys/ucred.h
59 # We apply a patch that tries to implement the support with our headers
60 CMAKE_OPTIONS
+= -D PHYSFS_HAVE_CDROM_SUPPORT
=ON
62 # We want proper threading, but no particular preference for test programs
63 # or choice of zlib, readline, etc. (see end of CMakeLists.txt in source)
64 CMAKE_OPTIONS
+= -D PHYSFS_HAVE_THREAD_SUPPORT
=ON
66 # Auto-generated dependencies
67 REQUIRED_PACKAGES
+= library
/readline
68 REQUIRED_PACKAGES
+= library
/zlib
69 REQUIRED_PACKAGES
+= system
/library