2 # This file and its contents are supplied under the terms of the
3 # Common Development and Distribution License ("CDDL"). You may
4 # only use this file in accordance with the terms of the CDDL.
6 # A full copy of the text of the CDDL should have accompanied this
7 # source. A copy of the CDDL is also available via the Internet at
8 # http://www.illumos.org/license/CDDL.
12 # Copyright 2022, Daniel Chan
13 # Copyright 2023, Andreas Wacknitz
16 USE_DEFAULT_TEST_TRANSFORMS
= yes
17 include ..
/..
/..
/make-rules
/shared-macros.mk
19 COMPONENT_NAME
= MediaInfoLib
20 COMPONENT_VERSION
= 23.9
22 COMPONENT_SUMMARY
= MediaInfo
(Lib
) is a convenient unified display of the most relevant technical and tag data for video and audio files.
23 COMPONENT_PROJECT_URL
= https
://github.com
/MediaArea
/$(COMPONENT_NAME
)
24 COMPONENT_SRC
= $(COMPONENT_NAME
)-$(HUMAN_VERSION
)
25 COMPONENT_ARCHIVE
= $(COMPONENT_SRC
).
tar.gz
26 COMPONENT_ARCHIVE_URL
= $(COMPONENT_PROJECT_URL
)/archive
/refs
/tags/v
$(HUMAN_VERSION
).
tar.gz
27 COMPONENT_ARCHIVE_HASH
= sha256
:0357d66ceb1b96d4b0e94a69cb44e84c8edff7b09fe7255b3b56e08280af413c
28 COMPONENT_FMRI
= library
/libmediainfo
29 COMPONENT_CLASSIFICATION
=System
/Libraries
30 COMPONENT_LICENSE
= BSD
2-Clause
31 COMPONENT_LICENSE_FILE
= LICENSE
33 include $(WS_MAKE_RULES
)/common.mk
35 COMPONENT_PRE_CONFIGURE_ACTION
= ( cp
-Rp
$(SOURCE_DIR
)/* $(@D
) && \
36 cd
$(@D
)/Project
/GNU
/Library
/ && .
/autogen.sh
; )
38 CONFIGURE_SCRIPT
= $(@D
)/Project
/GNU
/Library
/configure
40 CONFIGURE_OPTIONS
+= --enable-shared
41 CONFIGURE_OPTIONS
+= --disable-static
42 CONFIGURE_OPTIONS
+= --with-libcurl
43 CONFIGURE_OPTIONS
+= --with-libmms
44 CONFIGURE_OPTIONS
+= --with-graphviz
45 CONFIGURE_OPTIONS
+= "builddir=$(SOURCE_DIR)/../build/amd64"
46 CONFIGURE_ENV
+= CPPFLAGS
="$(CXXFLAGS) -DUNICODE -I/usr/include -DMEDIAINFO_GRAPHVIZ_NO -DMEDIAINFO_LIBCURL_NO -DMEDIAINFO_LIBMMS_NO -I$(SOURCE_DIR)/Source/ThirdParty/aes-gladman -I$(SOURCE_DIR)/Source/ThirdParty/md5 -I$(SOURCE_DIR)/Source/ThirdParty/sha1-gladman -I$(SOURCE_DIR)/Source/ThirdParty/sha2-gladman -I$(SOURCE_DIR)/Source/ThirdParty/hmac-gladman -I$(SOURCE_DIR)/Source/ThirdParty/tinyxml2 -I$(SOURCE_DIR)/Source/ThirdParty/base64 -DUNICODE -fPIC -O2"
47 CFLAGS
+= -I
$(SOURCE_DIR
)/Source
/ThirdParty
/aes-gladman
-I
$(SOURCE_DIR
)/Source
/ThirdParty
/md5
-I
$(SOURCE_DIR
)/Source
/ThirdParty
/sha1-gladman
-I
$(SOURCE_DIR
)/Source
/ThirdParty
/sha2-gladman
-I
$(SOURCE_DIR
)/Source
/ThirdParty
/hmac-gladman
-fPIC
-O2
48 CXXFLAGS
+= -DUNICODE
-DSIZE_T_IS_LONG
-I
$(SOURCE_DIR
)/Source
/ThirdParty
/aes-gladman
-I
$(SOURCE_DIR
)/Source
/ThirdParty
/md5
-I
$(SOURCE_DIR
)/Source
/ThirdParty
/sha1-gladman
-I
$(SOURCE_DIR
)/Source
/ThirdParty
/sha2-gladman
-I
$(SOURCE_DIR
)/Source
/ThirdParty
/hmac-gladman
-I
$(SOURCE_DIR
)/Source
/ThirdParty
/tinyxml2
-I
$(SOURCE_DIR
)/Source
/ThirdParty
/base64
-DUNICODE
-fPIC
-O2
50 # Copy test scripts into test folder and change PATH_SCRIPT=$(dirname $0) to PATH_SCRIPT="../build/amd64/test/"
51 COMPONENT_PRE_TEST_ACTION
= ( \
52 cp
-Rp
$(SOURCE_DIR
)/Project
/GNU
/Library
/test/* $(@D
)/test/ && \
53 $(GSED
) -i
-e
's;PATH_SCRIPT=$$(dirname \"$$0\");PATH_SCRIPT=\"$(@D)/test\";' $(@D
)/test/*.sh
&& \
54 chmod
755 $(@D
)/test/*.sh
)
56 # clone_regression_files target clones the test data
57 COMPONENT_TEST_TARGETS
= clone_regression_files
check
61 # Manually added dependencies
62 REQUIRED_PACKAGES
+= image
/graphviz
63 REQUIRED_PACKAGES
+= library
/video
/libmms
64 REQUIRED_PACKAGES
+= web
/curl
66 # Auto-generated dependencies
67 REQUIRED_PACKAGES
+= $(GCC_RUNTIME_PKG
)
68 REQUIRED_PACKAGES
+= $(GXX_RUNTIME_PKG
)
69 REQUIRED_PACKAGES
+= library
/libzen
70 REQUIRED_PACKAGES
+= library
/zlib
71 REQUIRED_PACKAGES
+= system
/library
72 REQUIRED_PACKAGES
+= system
/library
/math