Skip to content

Commit a558549

Browse files
committed
Migrate libtiff, libexpat and libconfig to cmake
Create libtiff_ps2_addons for store tiff loading functions by: Neovanglist. Move every downloaded repository to build folder
1 parent 8a1f688 commit a558549

File tree

193 files changed

+607
-89104
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

193 files changed

+607
-89104
lines changed

.gitignore

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,3 @@
3131
#
3232
*_irx.c
3333
build/
34-
libconfuse/
35-
libtap/
36-
lua/
37-
ps2_drivers/
38-
SIOCookie/
39-
ps2stuff/
40-
ps2gl/
41-
libconfuse/

Makefile

Lines changed: 17 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
LIBS := \
22
aalib\
33
cmakelibs\
4-
expat\
5-
libconfig\
64
libconfuse\
75
libid3tag\
86
libjpeg_ps2_addons\
@@ -60,20 +58,12 @@ cmakelibs: ps2_drivers libtiff
6058
clean-cmakelibs:
6159
rm -rf ./build
6260

63-
expat:
64-
$(MAKE) -C $@
65-
$(MAKE) -C $@ install
66-
67-
libconfig:
68-
$(MAKE) -C $@
69-
$(MAKE) -C $@ install
70-
7161
libconfuse:
7262
./fetch.sh v3.3 https://github.com/libconfuse/libconfuse
73-
cd $@ && ./autogen.sh
74-
cd $@ && CFLAGS_FOR_TARGET="-G0 -O2 -gdwarf-2 -gz" ./configure --host=mips64r5900el-ps2-elf --prefix=${PS2SDK}/ports --disable-shared --disable-examples
75-
$(MAKE) -C $@ all
76-
$(MAKE) -C $@ install
63+
cd build/$@ && ./autogen.sh
64+
cd build/$@ && CFLAGS_FOR_TARGET="-G0 -O2 -gdwarf-2 -gz" ./configure --host=mips64r5900el-ps2-elf --prefix=${PS2SDK}/ports --disable-shared --disable-examples
65+
$(MAKE) -C build/$@ all
66+
$(MAKE) -C build/$@ install
7767

7868
libid3tag: cmakelibs
7969
$(MAKE) -C $@ all
@@ -89,20 +79,16 @@ libmad: cmakelibs
8979

9080
libtap:
9181
./fetch.sh master https://github.com/ps2dev/libtap
92-
$(MAKE) -C $@ -f Makefile.PS2 all
93-
$(MAKE) -C $@ -f Makefile.PS2 install
82+
$(MAKE) -C build/$@ -f Makefile.PS2 all
83+
$(MAKE) -C build/$@ -f Makefile.PS2 install
9484

9585
clean-libtap:
9686
$(MAKE) -C libtap -f Makefile.PS2 clean
9787

98-
libtiff:
99-
$(MAKE) -C $@ all
100-
$(MAKE) -C $@ install
101-
10288
lua:
10389
./fetch.sh ee-v5.4.6 https://github.com/ps2dev/lua
104-
$(MAKE) -C $@ all platform=PS2
105-
$(MAKE) -C $@ install platform=PS2
90+
$(MAKE) -C build/$@ all platform=PS2
91+
$(MAKE) -C build/$@ install platform=PS2
10692

10793
clean-lua:
10894
$(MAKE) -C lua clean platform=PS2
@@ -123,21 +109,21 @@ ode:
123109

124110
ps2_drivers:
125111
./fetch.sh 1.6.2 https://github.com/fjtrujy/ps2_drivers
126-
$(MAKE) -C $@ all
127-
$(MAKE) -C $@ install
112+
$(MAKE) -C build/$@ all
113+
$(MAKE) -C build/$@ install
128114

129115
ps2stuff:
130116
./fetch.sh master https://github.com/ps2dev/ps2stuff
131-
$(MAKE) -C $@ install
117+
$(MAKE) -C build/$@ install
132118

133119
ps2gl: ps2stuff
134120
./fetch.sh master https://github.com/ps2dev/ps2gl
135-
$(MAKE) -C $@ install
136-
$(MAKE) -C $@/glut install
121+
$(MAKE) -C build/$@ install
122+
$(MAKE) -C build/$@/glut install
137123

138124
clean-ps2gl:
139-
$(MAKE) -C ps2gl clean
140-
$(MAKE) -C ps2gl/glut clean
125+
$(MAKE) -C build/ps2gl clean
126+
$(MAKE) -C build/ps2gl/glut clean
141127

142128
romfs:
143129
$(MAKE) -C $@
@@ -165,8 +151,8 @@ sdlttf: sdl cmakelibs
165151

166152
SIOCookie:
167153
./fetch.sh v1.0.4 https://github.com/israpps/SIOCookie
168-
$(MAKE) -C $@ all
169-
$(MAKE) -C $@ install
154+
$(MAKE) -C build/$@ all
155+
$(MAKE) -C build/$@ install
170156

171157
unzip: cmakelibs
172158
$(MAKE) -C $@

build-cmakelibs.sh

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,6 @@ function build_irx {
6464
(cd "${PS2SDK}" && ln -sf "../share/ps2dev.cmake" "ps2dev.cmake" && cd -)
6565
(cd "${PS2SDK}" && ln -sf "../share/ps2dev_iop.cmake" "ps2dev_iop.cmake" && cd -)
6666

67-
##
68-
## Create build folder
69-
##
70-
mkdir -p build
71-
cd build
72-
7367
##
7468
## Clone repos
7569
##
@@ -103,8 +97,13 @@ $FETCH 096d0711ca3e294564a5c6ec18f5bbc3a2aac016 https://github.com/sezero/mikmod
10397
# https://github.com/xiph/theora/pull/14
10498
$FETCH feature/cmake https://github.com/mcmtroffaes/theora.git &
10599

100+
# gsKit requires libtiff
101+
$FETCH v4.6.0 https://gitlab.com/libtiff/libtiff.git &
102+
106103
# SDL requires to have gsKit
107-
$FETCH v1.3.7 https://github.com/ps2dev/gsKit &
104+
# We need to clone the whole repo and point to the specific hash for now,
105+
# till a new version is released after this commit
106+
$FETCH a08a0ca41a4ab54a7a34a2068fe04e7545cfd0ad https://github.com/Wolf3s/gsKit.git &
108107

109108
# We need to clone the whole repo and point to the specific hash for now,
110109
# till a new version is released after this commit
@@ -122,20 +121,25 @@ $FETCH fb5597bf3852aeb9aef5ca7305e049bfb4c0bb7f https://github.com/sahlberg/libs
122121
$FETCH 7083138fd401faa391c4f829a86b50fdb9c5c727 https://github.com/lsalzman/enet.git &
123122

124123
# Use wget to download argtable2
125-
wget -c http://prdownloads.sourceforge.net/argtable/argtable2-13.tar.gz &
124+
wget -c --directory-prefix=build http://prdownloads.sourceforge.net/argtable/argtable2-13.tar.gz &
126125
$FETCH v3.2.2.f25c624 https://github.com/argtable/argtable3.git &
127126

127+
$FETCH v1.7.3 https://github.com/hyperrealm/libconfig.git &
128+
129+
$FETCH R_2_6_2 https://github.com/libexpat/libexpat.git &
130+
128131
# wait for fetch jobs to finish
129132
wait
130133

131134
# extract argtable2
132-
tar -xzf argtable2-13.tar.gz
135+
tar -xzf build/argtable2-13.tar.gz -C build
133136

134137
# NOTE: jsoncpp
135138
# "snprintf" not found in "std" namespace error may occur, so patch that out here.
136-
pushd jsoncpp
139+
pushd build/jsoncpp
137140
sed -i -e 's/std::snprintf/snprintf/' include/json/config.h
138141
popd
142+
cd build
139143

140144
##
141145
## Build cmake projects
@@ -161,6 +165,10 @@ build_ee mikmod/libmikmod -DENABLE_SHARED=0 -DENABLE_DOC=OFF
161165
build_ee jsoncpp -DBUILD_OBJECT_LIBS=OFF -DJSONCPP_WITH_TESTS=OFF -DJSONCPP_WITH_POST_BUILD_UNITTEST=OFF
162166
build_ee theora
163167

168+
# libtiff and libtiff_ps2_addons is mandatory for gsKit
169+
CFLAGS="-Dlfind=bsearch" build_ee libtiff -DBUILD_SHARED_LIBS=OFF -Dtiff-tools=OFF -Dtiff-tests=OFF
170+
make all install -j -C ../libtiff_ps2_addons
171+
164172
# gsKit is mandatory for SDL
165173
build_ee gsKit
166174
build_ee SDL -DCMAKE_POSITION_INDEPENDENT_CODE=OFF -DSDL_TESTS=OFF
@@ -182,5 +190,9 @@ build_ee libsmb2 -DPS2RPC=1
182190
build_iop libsmb2
183191
build_irx libsmb2 -DBUILD_IRX=1
184192

193+
CFLAGS="-DHAVE_NEWLOCALE -DHAVE_USELOCALE -DHAVE_FREELOCALE" build_ee libconfig -DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF -DBUILD_SHARED_LIBS=OFF
194+
195+
CFLAGS="-Darc4random_buf=random -DHAVE_GETRANDOM" build_ee libexpat/expat -DEXPAT_BUILD_EXAMPLES=OFF -DEXPAT_BUILD_TESTS=OFF -DEXPAT_SHARED_LIBS=OFF -DEXPAT_BUILD_TOOLS=OFF
196+
185197
# Finish
186198
cd ..

expat/COPYING

Lines changed: 0 additions & 22 deletions
This file was deleted.

expat/Changes

Lines changed: 0 additions & 134 deletions
This file was deleted.

0 commit comments

Comments
 (0)