Skip to content

Commit e4b027c

Browse files
committed
Update dependencies and Makefile menu
1 parent 77608a1 commit e4b027c

6 files changed

Lines changed: 41 additions & 66 deletions

File tree

Makefile

Lines changed: 25 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -104,28 +104,10 @@ help:
104104
@echo "$(PROJECT) Makefile."
105105
@echo "The following commands are available:"
106106
@echo ""
107-
@echo " make buildall : Build and test everything from scratch"
108-
@echo " make bz2 : Package the library in a compressed bz2 archive"
109-
@echo " make clean : Delete the vendor and target directories"
110-
@echo " make codefix : Fix code style violations"
111-
@echo " make deb : Build a DEB package for Debian-like Linux distributions"
112-
@echo " make deps : Download all dependencies"
113-
@echo " make doc : Generate source code documentation"
114-
@echo " make lint : Test source code for coding standard violations"
115-
@echo " make qa : Run all tests and reports"
116-
@echo " make report : Generate various reports"
117-
@echo " make rpm : Build an RPM package for RedHat-like Linux distributions"
118-
@echo " make server : Start the development server"
119-
@echo " make test : Run unit tests"
120-
@echo " make versionup: Increase the version patch number"
107+
@awk '/^## /{desc=substr($$0,4)} /^\.PHONY:/{if(NF>1) {target=$$2; if(desc) printf " make %-15s: %s\n",target,desc; desc=""}}' Makefile
121108
@echo ""
122-
@echo " make fonts : Import and convert fonts"
123-
@echo " make rpm_fonts: Build fonts RPM packages"
124-
@echo " make deb_fonts: Build fonts DEB packages"
125-
@echo " make bz2_fonts: Build fonts tar bz2 (tbz2) compressed archives"
126-
@echo ""
127-
@echo "To test and build everything from scratch:"
128-
@echo "make buildall"
109+
@echo "To test and build everything from scratch, use the shortcut:"
110+
@echo " make x"
129111
@echo ""
130112

131113
# alias for help target
@@ -136,24 +118,24 @@ all: help
136118
.PHONY: x
137119
x: buildall
138120

139-
# Full build and test sequence
121+
## Full build and test sequence
140122
.PHONY: buildall
141123
buildall: deps codefix fonts qa bz2 rpm deb
142124

143-
# Package the library in a compressed bz2 archive
125+
## Package the library in a compressed bz2 archive
144126
.PHONY: bz2
145127
bz2:
146128
rm -rf $(PATHBZ2PKG)
147129
make install DESTDIR=$(PATHBZ2PKG)
148130
tar -jcvf $(PATHBZ2PKG)/$(PKGNAME)-$(VERSION)-$(RELEASE).tbz2 -C $(PATHBZ2PKG) $(DATADIR)
149131

150-
# Delete the vendor and target directories
132+
## Delete the vendor and target directories
151133
.PHONY: clean
152134
clean:
153135
rm -rf ./vendor $(TARGETDIR)
154136
cd util && make clean
155137

156-
# Fix code style violations
138+
## Fix code style violations
157139
.PHONY: codefix
158140
codefix:
159141
./vendor/bin/phpcbf --config-set ignore_non_auto_fixable_on_exit 1
@@ -162,7 +144,7 @@ codefix:
162144
--standard=psr12 \
163145
src test
164146

165-
# Build a DEB package for Debian-like Linux distributions
147+
## Build a DEB package for Debian-like Linux distributions
166148
.PHONY: deb
167149
deb:
168150
rm -rf $(PATHDEBPKG)
@@ -187,7 +169,7 @@ endif
187169
echo "new-package-should-close-itp-bug" > $(PATHDEBPKG)/$(PKGNAME)-$(VERSION)/debian/$(PKGNAME).lintian-overrides
188170
cd $(PATHDEBPKG)/$(PKGNAME)-$(VERSION) && debuild -us -uc
189171

190-
# Clean all artifacts and download all dependencies
172+
## Clean all artifacts and download all dependencies
191173
.PHONY: deps
192174
deps: ensuretarget
193175
rm -rf ./vendor/* $(TARGETDIR)/fonts
@@ -196,21 +178,21 @@ deps: ensuretarget
196178
&& chmod +x ./vendor/phpstan.phar
197179
cd util && make deps
198180

199-
# Generate source code documentation
181+
## Generate source code documentation
200182
.PHONY: doc
201183
doc: ensuretarget
202184
rm -rf $(TARGETDIR)/doc
203185
$(PHPDOC) -d ./src -t $(TARGETDIR)/doc/
204186

205-
# Create missing target directories for test and build artifacts
187+
## Create missing target directories for test and build artifacts
206188
.PHONY: ensuretarget
207189
ensuretarget:
208190
mkdir -p $(TARGETDIR)/test
209191
mkdir -p $(TARGETDIR)/report
210192
mkdir -p $(TARGETDIR)/doc
211193
mkdir -p $(TARGETDIR)/fonts
212194

213-
# Install this application
195+
## Install this application
214196
.PHONY: install
215197
install: uninstall
216198
mkdir -p $(PATHINSTBIN)
@@ -232,7 +214,7 @@ ifneq ($(strip $(CONFIGPATH)),)
232214
find $(PATHINSTCFG) -type f -exec chmod 644 {} \;
233215
endif
234216

235-
# Test source code for coding standard violations
217+
## Test source code for coding standard violations
236218
.PHONY: lint
237219
lint:
238220
./vendor/bin/phpcbf --config-set ignore_non_auto_fixable_on_exit 1
@@ -241,17 +223,17 @@ lint:
241223
./vendor/bin/phpmd test text unusedcode,naming,design --exclude vendor
242224
php -r 'exit((int)version_compare(PHP_MAJOR_VERSION, "7", ">"));' || ./vendor/phpstan.phar analyse
243225

244-
# Run all tests and reports
226+
## Run all tests and reports
245227
.PHONY: qa
246228
qa: ensuretarget lint test report
247229

248-
# Generate various reports
230+
## Generate various reports
249231
.PHONY: report
250232
report: ensuretarget
251233
./vendor/bin/pdepend --jdepend-xml=$(TARGETDIR)/report/dependencies.xml --summary-xml=$(TARGETDIR)/report/metrics.xml --jdepend-chart=$(TARGETDIR)/report/dependecies.svg --overview-pyramid=$(TARGETDIR)/report/overview-pyramid.svg --ignore=vendor ./src
252234
#./vendor/bartlett/php-compatinfo/bin/phpcompatinfo --no-ansi analyser:run src/ > $(TARGETDIR)/report/phpcompatinfo.txt
253235

254-
# Build the RPM package for RedHat-like Linux distributions
236+
## Build the RPM package for RedHat-like Linux distributions
255237
.PHONY: rpm
256238
rpm:
257239
rm -rf $(PATHRPMPKG)
@@ -269,59 +251,58 @@ rpm:
269251
--define "_configpath /$(CONFIGPATH)" \
270252
-bb resources/rpm/rpm.spec
271253

272-
# Start the development server
254+
## Start the development server
273255
.PHONY: server
274256
server:
275257
$(PHP) -t example -S localhost:$(PORT)
276258

277-
# Tag this GIT version
259+
## Tag this GIT version
278260
.PHONY: tag
279261
tag:
280262
git checkout main && \
281263
git tag -a ${VERSION} -m "Release ${VERSION}" && \
282264
git push origin --tags && \
283265
git pull
284266

285-
# Run unit tests
267+
## Run unit tests
286268
.PHONY: test
287269
test:
288270
cp phpunit.xml.dist phpunit.xml
289271
#./vendor/bin/phpunit --migrate-configuration || true
290272
XDEBUG_MODE=coverage ./vendor/bin/phpunit --stderr test
291273

292-
# Remove all installed files
274+
## Remove all installed files
293275
.PHONY: uninstall
294276
uninstall:
295277
rm -rf $(PATHINSTBIN)
296278
rm -rf $(PATHINSTDOC)
297279

298-
# Increase the version patch number
280+
## Increase the version patch number
299281
.PHONY: versionup
300282
versionup:
301283
echo ${VERSION} | gawk -F. '{printf("%d.%d.%d\n",$$1,$$2,(($$3+1)));}' > VERSION
302284

303285
# ----------
304286

305-
# import and convert fonts
287+
## import and convert fonts
306288
fonts:
307289
cd util && ($(COMPOSER) install -vvv --no-interaction)
308290
cd util && make build
309291

310-
# Build fonts RPM packages for RedHat-like Linux distributions
292+
## Build fonts RPM packages for RedHat-like Linux distributions
311293
rpm_fonts:
312294
$(foreach PKGFONTDIR,$(FONTLIST), \
313295
cd ${CURRENTDIR}/util && make rpm PKGFONTDIR=${PKGFONTDIR} ; \
314296
)
315297

316-
# Build fonts DEB packages for Debian-like Linux distributions
298+
## Build fonts DEB packages for Debian-like Linux distributions
317299
deb_fonts:
318300
$(foreach PKGFONTDIR,$(FONTLIST), \
319301
cd ${CURRENTDIR}/util && make deb PKGFONTDIR=${PKGFONTDIR} ; \
320302
)
321303

322-
# build fonts compressed bz2 archives
304+
## build fonts compressed bz2 archives
323305
bz2_fonts:
324306
$(foreach PKGFONTDIR,$(FONTLIST), \
325307
cd ${CURRENTDIR}/util && make bz2 PKGFONTDIR=${PKGFONTDIR} ; \
326308
)
327-

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.6.34
1+
2.6.35

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"require-dev": {
3838
"pdepend/pdepend": "2.16.2",
3939
"phpmd/phpmd": "2.15.0",
40-
"phpunit/phpunit": "13.0.5 || 12.5.14 || 11.5.55 || 10.5.63",
40+
"phpunit/phpunit": "13.1.1 || 12.5.17 || 11.5.55 || 10.5.63",
4141
"squizlabs/php_codesniffer": "4.0.1",
4242
"phpcompatibility/php-compatibility": "^10.0.0@dev"
4343
},

resources/debian/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ Vcs-Git: https://github.com/~#VENDOR#~/~#PROJECT#~.git
1010
Package: ~#PKGNAME#~
1111
Provides: php-~#PROJECT#~
1212
Architecture: all
13-
Depends: php (>= 8.1.0), php-json, php-zip, php-tecnickcom-tc-lib-file (<< 3.0.0), php-tecnickcom-tc-lib-file (>= 2.3.2), php-tecnickcom-tc-lib-unicode-data (<< 3.0.0), php-tecnickcom-tc-lib-unicode-data (>= 2.0.44), php-tecnickcom-tc-lib-pdf-encrypt (<< 3.0.0), php-tecnickcom-tc-lib-pdf-encrypt (>= 2.1.36), php-tecnickcom-tc-lib-pdf-font-core (<< 2.0.0), php-tecnickcom-tc-lib-pdf-font-data-core (>= 1.8.7), ${misc:Depends}
13+
Depends: php (>= 8.1.0), php-json, php-zip, php-tecnickcom-tc-lib-file (<< 3.0.0), php-tecnickcom-tc-lib-file (>= 2.3.3), php-tecnickcom-tc-lib-unicode-data (<< 3.0.0), php-tecnickcom-tc-lib-unicode-data (>= 2.0.45), php-tecnickcom-tc-lib-pdf-encrypt (<< 3.0.0), php-tecnickcom-tc-lib-pdf-encrypt (>= 2.1.37), php-tecnickcom-tc-lib-pdf-font-core (<< 2.0.0), php-tecnickcom-tc-lib-pdf-font-data-core (>= 1.8.7), ${misc:Depends}
1414
Description: PHP PDF Fonts Library
1515
PHP library containing PDF font methods and utilities.

resources/rpm/rpm.spec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ Requires: php-json
2121
Requires: php-pcre
2222
Requires: php-zlib
2323
Requires: php-composer(%{c_vendor}/tc-lib-file) < 3.0.0
24-
Requires: php-composer(%{c_vendor}/tc-lib-file) >= 2.3.2
24+
Requires: php-composer(%{c_vendor}/tc-lib-file) >= 2.3.3
2525
Requires: php-composer(%{c_vendor}/tc-lib-unicode-data) < 3.0.0
26-
Requires: php-composer(%{c_vendor}/tc-lib-unicode-data) >= 2.0.44
26+
Requires: php-composer(%{c_vendor}/tc-lib-unicode-data) >= 2.0.45
2727
Requires: php-composer(%{c_vendor}/tc-lib-pdf-encrypt) < 3.0.0
28-
Requires: php-composer(%{c_vendor}/tc-lib-pdf-encrypt) >= 2.1.36
28+
Requires: php-composer(%{c_vendor}/tc-lib-pdf-encrypt) >= 2.1.37
2929
Requires: php-composer(%{c_vendor}/tc-lib-pdf-font-data-core) < 2.0.0
3030
Requires: php-composer(%{c_vendor}/tc-lib-pdf-font-data-core) >= 1.8.7
3131

util/Makefile

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -86,41 +86,35 @@ help:
8686
@echo "${PROJECT} Makefile."
8787
@echo "The following commands are available:"
8888
@echo ""
89-
@echo " make clean : Delete the vendor and target directory"
90-
@echo " make build : Clean and download the composer dependencies"
91-
@echo " make update : Update composer dependencies"
92-
@echo " make install : Install this library"
93-
@echo " make uninstall : Remove all installed files"
94-
@echo " make rpm : Build an RPM package"
95-
@echo " make deb : Build a DEB package"
96-
@echo " make bz2 : Build a tar bz2 (tbz2) compressed archive"
89+
@awk '/^## /{desc=substr($$0,4)} /^\.PHONY:/{if(NF>1) {target=$$2; if(desc) printf " make %-15s: %s\n",target,desc; desc=""}}' Makefile
9790
@echo ""
9891

9992
# alias for help target
10093
.PHONY: all
10194
all: help
10295

103-
# delete the vendor and target directory
96+
## delete the vendor and target directory
10497
.PHONY: clean
10598
clean:
10699
rm -rf ./vendor/
107100
rm -rf ../target/fonts
108101

102+
## Download all dependencies
109103
.PHONY: deps
110104
deps:
111105
($(COMPOSER) install --no-dev --no-interaction)
112106

113-
# clean and download the composer dependencies (all TTF font files)
107+
## Clean and download the composer dependencies (all TTF font files)
114108
.PHONY: build
115109
build: deps
116110
./bulk_convert.php
117111

118-
# update composer dependencies
112+
## Update composer dependencies
119113
.PHONY: update
120114
update:
121115
($(COMPOSER) update --no-interaction)
122116

123-
# Install this application
117+
## Install this application
124118
.PHONY: install
125119
install: uninstall
126120
mkdir -p $(PATHINSTFONT)
@@ -135,14 +129,14 @@ install: uninstall
135129
cp -f ../RELEASE $(PATHINSTDOC)
136130
chmod -R 644 $(PATHINSTDOC)*
137131

138-
# Remove all installed files
132+
## Remove all installed files
139133
.PHONY: uninstall
140134
uninstall:
141135
rm -rf $(PATHINSTFONT)
142136

143137
# --- PACKAGING ---
144138

145-
# Build the RPM package for RedHat-like Linux distributions
139+
## Build the RPM package for RedHat-like Linux distributions
146140
.PHONY: rpm
147141
rpm:
148142
rm -rf $(PATHRPMPKG)
@@ -161,7 +155,7 @@ rpm:
161155
--define "_license $(PKGFONTLICENSE)" \
162156
-bb ../resources/rpm/fonts.spec
163157

164-
# Build the DEB package for Debian-like Linux distributions
158+
## Build the DEB package for Debian-like Linux distributions
165159
.PHONY: deb
166160
deb:
167161
echo resources/fonts/control/$(DEBCOPYRIGHT)
@@ -185,7 +179,7 @@ deb:
185179
echo "extra-license-file $(DOCPATH)LICENSE.gz" >> $(PATHDEBPKG)/$(PKGNAME)-$(VERSION)/debian/$(PKGNAME).lintian-overrides
186180
cd $(PATHDEBPKG)/$(PKGNAME)-$(VERSION) && debuild -us -uc
187181

188-
# build a compressed bz2 archive
182+
## Build a compressed bz2 archive
189183
.PHONY: bz2
190184
bz2:
191185
rm -rf $(PATHBZ2PKG)

0 commit comments

Comments
 (0)