Commit Graph

88 Commits

Author SHA1 Message Date
Celeste
19bebd8497 apkbuild-cpan.in: use distribution name cached in %distfiles
instead of sending a duplicate query to metacpan

follow up from what was done in
e448c9a452
2024-03-05 11:01:27 +00:00
Timothy Legge
5710eefb63 apkbuild-cpan.in: remove perl-dev package wherever it occurs
if the package does not have any xs files and the old APKBUILD data is used

The regex to get perl-dev wherever it might occur was breaking my head
2024-03-05 11:01:27 +00:00
Timothy Legge
b0fb5c7038 apkbuild-cpan.in: don't add perl-dev if its not needed on recreate 2024-03-05 11:01:27 +00:00
Timothy Legge
60c00a4d39 apkbuild-cpan.in: Remmove unnecessary/unused code
Should have been removed in:
27c430cc64
2024-02-01 22:08:23 -04:00
Timothy Legge
99cda3db69 apkbuild-cpan.in: fix uninitialized value when running with no parameters
by applying Celeste's suggested fix
2024-02-01 22:08:23 -04:00
Timothy Legge
1dd67c1beb apkbuild-cpan.in: remove unnecessary pragmas 2024-02-01 22:08:17 -04:00
Timothy Legge
9cde1ad278 apkbuild-cpan.in: Standardize the source and patches output 2024-02-01 07:35:23 -04:00
Celeste
0ad7489969 apkbuild-cpan.in: move code that queries metacpan into its own function
this piece of code was repeated in multiple places, so factor it out
2024-01-31 19:29:56 -04:00
Timothy Legge
726e37920c apkbuild-cpan.in: fix read_assignments_from_file
remove unnecessary regex in functions

Return early if not processing an APKBUILD file

and fix undefined variable of there are no patches
2024-01-30 23:05:45 -04:00
Celeste
1c017bb5d5 apkbuild-cpan.in: add newline after inserting *depends=
Upon `apkbuild-cpan upgrade`, an aport without any
checkdepends would get a line like this inserted:
`checkdepends=""subpackages="$pkgname-doc"`

which would then be deleted by the substitution
that removes empty variables, so the net result
is an APKBUILD with the subpackages field removed.

Inserting a newline results in `checkdepends=""`
being a line all by itself, which then gets
correctly removed by the empty variables regex.
2024-01-28 02:50:25 +00:00
Timothy Legge
b0f60ee85a apkbuild-cpan.in: fixes #10129 move _pkgreal and comment 2024-01-27 12:10:06 -04:00
Celeste
28edb26d5b apkbuild-cpan.in: fix empty lines in recreated depends variables
this is a preliminary attempt at fixing #10126, however, i think
the whole logic around recreating depends should be reviewed and
improved, as we may want to carry over all the depends from the
old APKBUILD, and not just the non-perl libs, as the old depends
may be compensating for something not declared in the META file.
2024-01-26 22:33:02 -04:00
Celeste
b48c12ea86 apkbuild-cpan.in: do not increase number of spaces in options_comment
the regex used to match options_comment in read_assignments_from_file
starts matching immediately after the closing double quote (it does
not remove the prefixing space), so without this change, a new space
is inserted by the template upon each `recreate`.
2024-01-26 21:37:18 -04:00
Celeste
6a8a61f9d8 apkbuild-cpan.in: find Build.PL using glob() in update_functions sub
this is more consistent with the method we use to
find Build.PL / Makefile.PL in the do_depends sub
2024-01-26 21:37:18 -04:00
Celeste
1c771b0d6a apkbuild-cpan.in: keep arch of old APKBUILD
also, prevent removal of `arch=""` line,
which is sometimes used for disabled aports
2024-01-26 21:37:18 -04:00
Celeste
ef6aef38b1 apkbuild-cpan.in: sort & de-duplicate dependencies 2024-01-26 21:37:18 -04:00
Celeste
41a36bca95 apkbuild-cpan.in: move .pod files to the -doc subpackage
this `doc()` function is copied from main/perl/APKBUILD
2024-01-26 21:37:18 -04:00
Celeste
3336955a4a apkbuild-cpan.in: update $package_mappings 2024-01-26 21:37:18 -04:00
Celeste
fe072f9866 apkbuild-cpan.in: fix empty directories
by not installing .packlist and perllocal.pod.

The call to find -delete has been removed as
the modifications to build() have covered
almost all cases, so deleting .packlist and
perllocal.pod manually is no longer necessary.

Also, increment template version from 3
to 4 to allow easy identification of
aports that have this change applied.
2024-01-26 21:37:18 -04:00
Celeste
7101d6164a apkbuild-cpan.in: also attempt to generate MYMETA from running Build.PL 2024-01-26 21:37:18 -04:00
Celeste
1753907af0 apkbuild-cpan.in: fix use of uninitialized value $1 2024-01-26 21:37:18 -04:00
Timothy Legge
c704644b3c Initial attempt to keep the options and patches 2024-01-26 21:37:18 -04:00
Celeste
37e99da359 apkbuild-cpan.in: tidy up abstract before using it as pkgdesc 2024-01-26 21:37:18 -04:00
Celeste
0bb1482c3a New way of calculating builddir & metaprefix
apkbuild-cpan.in: attempt to get a metaprefix if no metafiles exist

apkbuild-cpan.in: try harder to find a metaprefix

apkbuild-cpan.in: redefine builddir if not based on $_pkgreal
2024-01-26 21:37:18 -04:00
Timothy Legge
505a64bfa7 Improve handling of missing meta files and detection of perl-dev requirment 2024-01-26 21:37:18 -04:00
Iztok Fister Jr
617df473b0 apkbuild-cpan: fix typo 2023-07-07 22:48:12 +02:00
psykose
d4b2415fb1 apkbuild-cpan: run perltidy over the source
it was a mismatch of mixed indents
2023-07-03 23:52:43 +02:00
psykose
0e555d58a7 apkbuild-cpan: port given/when to if/else
the former is deprecated syntax
2023-07-03 23:49:52 +02:00
Timothy Legge
7dc9c33c88 apkbuild-cpan.in: remove perl-dev as a makedepends default 2023-04-14 06:41:14 +00:00
Timothy Legge
e0e6ee0d14 apkbuild-cpan.in: prevent inserting extra new line before checksum on upgrade 2021-06-10 14:31:02 +00:00
Timothy Legge
fbd28a76f0 apkbuild-cpan.in: don't change arch on an upgrade of package 2021-06-10 14:31:02 +00:00
Timothy Legge
474edd8fd9 Fix issue with incorrectly inserted newline 2021-06-10 14:31:02 +00:00
Timothy Legge
3af74788bb apkbuild-cpan.in: package sort order on upgrade 2021-04-04 00:27:34 -03:00
Timothy Legge
775efcf61d apkbuild-cpan.in: fix formatting issue on upgrade 2021-04-04 00:25:47 -03:00
Timothy Legge
b699730091 apkbuild-cpan.in: Fixes #9994 mod version with non-numeric 2021-02-16 02:28:04 +00:00
Timothy Legge
802822f57e apkbuild-cpan.in fix format_deps issues 2021-02-16 02:27:57 +00:00
Timothy Legge
8cbd4a6ac2 apkbuild-cpan.in: Fixes #10010 - might create duplicate perl-module-build deps 2021-02-15 02:29:00 +00:00
Timothy Legge
b7196278b1 apkbuild-cpan.in: Fixes #10025 - invalid 'Duplicate' removed 2021-02-15 01:21:18 +00:00
Timothy Legge
c1dadac7d3 apkbuild-cpan.in: only wrap lines greater than set 2021-01-07 14:06:35 +00:00
Timothy Legge
4544a479d1 apkbuild-cpan.in: remove duplicates from each of depends 2021-01-07 14:06:35 +00:00
Timothy Legge
3129c7bcdb apkbuild-cpan.in: format depends indent and wrap 2021-01-07 14:06:35 +00:00
Timothy Legge
9dde1e73e2 Add license_mapping for Apache-2.0 2021-01-07 14:06:35 +00:00
Timothy Legge
bda2774811 apkbuild-cpan.in: add gpl_2 license_mapping 2020-09-17 22:03:47 +00:00
Timothy Legge
a3eb828a7c apkbuild-cpan.in: add back non perl dependencies on recreate 2020-07-08 11:47:24 +00:00
Timothy Legge
d984d89ced Keep original package order on recreate 2020-07-06 10:51:33 +00:00
Timothy Legge
b60dd09b3b apkbuild-cpan.in: keep provides and replaces on recreate and deal with pkgrel 2020-03-27 02:02:24 +00:00
Timothy Legge
b9f6741f11 apkbuild-cpan.in: add or between license 2020-03-27 02:02:24 +00:00
Timothy Legge
b09e522d70 apkbuild-cpan.in: add additional license and package mappings 2020-03-27 02:02:24 +00:00
Timothy Legge
e448c9a452 apkbuild-cpan.in: Avoid processing duplicate modules in parse_deps 2020-03-27 02:02:24 +00:00
Timothy Legge
8c62020a34 apkbuild-cpan.in: Fix issue if Build.PL and add perl-module-build as makedeps 2020-03-27 02:02:24 +00:00