Commit graph

5387 commits

Author SHA1 Message Date
rillig
13d86735e6 pkgtools/url2pkg: clean up code 2019-10-05 19:59:04 +00:00
rillig
ef574bcc42 pkgtools/url2pkg: add test for main function 2019-10-05 19:24:35 +00:00
rillig
dda3ba4427 pkgtools/url2pkg: fixed migration of Python packages from GitHub to PyPI 2019-10-05 18:00:09 +00:00
rillig
69161ba6da pkgtools/url2pkg: ignore URL protocol
The MASTER_SITE_GNU still uses http:// for downloading the distfiles.
Since typical URLs today use https://, ignore the protocol when matching
the given URL against the MASTER_SITE_* variables from mk/fetch/sites.mk.
2019-10-05 12:22:51 +00:00
rillig
ee09a14fc0 pkgtools/url2pkg: improve URL handling for SourceForge
* Improved handling of SourceForge URLs
* Fixed wrong HOMEPAGE for URLs composed from MASTER_SITE_*
* Improved the existing tests and added some more
2019-10-05 11:02:30 +00:00
rillig
20c0cec0e4 pkgtools/url2pkg: reorganize the Python implementation
The previous version of the code was largely work in progress. Now the code
has been grouped and sorted. A few bugs have been fixed on the way:

* If a PKGNAME had been added in the interactive editor session, it had
  been overwritten before. This was because of a typo.

* The whole code has been grouped into classes, to clearly show the
  dependencies between the parts.

* Generation of the initial Makefile has been split into smaller methods,
  to make them individually testable and to reduce the scope of the local
  variables.

* When creating a package in a directory pkgsrc/local/*, "local" is not
  used as the primary category of the package.

* GNU configure and other configure scripts are also detected if they are
  not placed directly in WRKSRC.

* Packages that contain *.po files will have USE_PKGLOCALEDIR=yes in the
  package Makefile. Previously, only *.mo or *.gmo files triggered this
  variable.

* When PKGNAME is based on DISTNAME, it is only written to the package
  Makefile if there is an actual prefix or transformation.
2019-10-04 22:26:34 +00:00
rillig
1dad43e5ec pkgtools/url2pkg: keep DESCR and PLIST, fix GConf detection
The files DESCR and PLIST are no longer overwritten. They are only
created if they don't exist.

The GConf schemas detection had written the include line too often, once
for every schema file.
2019-10-03 23:02:59 +00:00
rillig
9f6159e636 pkgtools/url2pkg: ignore commented variables 2019-10-03 18:28:29 +00:00
rillig
a79314833e pkgtools/url2pkg: use filenames relative to WRKSRC
Before this change, the Python implementation had written absolute paths
to PKGCONFIG_OVERRIDE, which didn't make sense.
2019-10-03 16:43:58 +00:00
rillig
df89c4576a pkgtools/url2pkg: add BUILDLINK_API_DEPENDS and BUILDLINK_DEPENDS 2019-10-03 16:32:47 +00:00
rillig
6723bb6cd0 pkgtools/url2pkg: remove leftover debug print statement 2019-10-03 14:48:48 +00:00
rillig
35fa65524e pkgtools/url2pkg: improve Python implementation
* verbose mode no longer crashes
* licenses and other variables are copied to the package Makefile
* several more automatic tests
2019-10-03 12:52:54 +00:00
rillig
b1d365d642 pkgtools/url2pkg: update to 19.3.1
Changes since 19.3.0:

* Added an alternative url2pkg implementation in Python that will
  eventually replace the Perl implementation. Reasons are:

  * Perl is cumbersome to type with all the special characters
  * Perl does not even have a Boolean type, after all the years
  * Perl cannot check the number of arguments passed to subs
  * Python does not suffer from the above limitations
  * Python is available on as many platforms as Perl

* The two implementations will be kept in sync until all the features
  have made it into the Python implementation, and everything has
  automatic tests.

* Added the -v or --verbose command line option.
2019-10-03 09:37:40 +00:00
rillig
ae18c3f6b7 pkgtools/url2pkg: fix option handling 2019-10-03 09:31:36 +00:00
rillig
44572afbfd pkgtools/url2pkg: small adjustments
* Fixed copy-and-paste typo in MakeMaker Perl module.

* Added -v command line option.
2019-10-02 15:57:37 +00:00
rillig
0b4c862c88 pkgtools/pkglint: update to 19.3.0
Changes since 5.7.24:

* There is no need to ask the dummy MAINTAINER from url2pkg whether
  committing changes is ok.

* When autofixing a condition like !empty(PKGPATH:Mliteral), don't
  generate unnecessary parentheses around ${PKGPATH} == literal.

* In a _VARGROUPS section, the public variables should be listed
  before the private variables, to put important things first.

* When pkglint suggests to be run again with the -e, -fs or -F options,
  repeat the whole command line, to allow for copy-and-paste.

* The checks for PKGPATH are fixed and enhanced. It is not a relative
  path like in ../../category/package, but relative to the pkgsrc root.

* Unintended file globbing in sed commands such as s,.*,any, gets a
  warning.

* MASTER_SITES should normally end with a slash, in rare cases an
  equals sign or a colon are correct, too.

* Detect redundant directories in INSTALLATION_DIRS.
2019-10-01 21:37:59 +00:00
rillig
b38d9bdba3 pkgtools/url2pkg: update to 19.3.0
Changes since 2.37:

* Test dependencies in Perl MakeMaker modules are copied to the
  package Makefile.

* Unknown dependencies in Perl MakeMaker modules no longer abort url2pkg
  but instead are added as "# TODO" dependencies to the package Makefile.

* The license from Perl MakeMaker and Python modules is copied to the
  package Makefile.

* The build dependencies, COMMENT and HOMEPAGE from Python setuptools
  modules are copied to the package Makefile.

* No more "undefined $url" when running url2pkg in a directory that
  already has a package Makefile and is extracted.
2019-10-01 19:41:23 +00:00
rillig
3d927c90d8 pkgtools/url2pkg: update to 2.37
Changes since 2.36:

* Fixed generation of the package Makefile. Due to a typo, the line that
  included bsd.pkg.mk had been omitted, making any generated package fail.
2019-10-01 18:43:46 +00:00
bsiegert
866c85b303 Revbump all Go packages after 1.12.10 update.
ok wiz@ for PMC
2019-09-26 20:10:39 +00:00
jperkin
c0b827e822 pkgin: Update to 0.13.0.
## Version 0.13.0 (2019-09-24)

 * "pkgin upgrade" now upgrades all packages instead of only keep packages, and
   essentially replaces "pkgin full-upgrade".  Selective upgrades have always
   been risky and provide no benefit, especially in light of refresh support.
   "pkgin full-upgrade" is retained for compatibility but marked as deprecated.
 * Refresh the local package repository when a forced update is requested, so
   that a failed update can be repaired easily.
 * Switch NetBSD default repository from ftp.netbsd.org to cdn.netbsd.org.
2019-09-24 12:57:22 +00:00
rillig
0c496b4733 pkgtools/libnbcompat: fix regular expression literals in AWK program
gawk: nbcompat.awk:5: warning:
regexp escape sequence `\#' is not a known regexp operator
2019-09-13 20:23:50 +00:00
rillig
89c2624ba0 pkgtools/texlive2pkg: fix pkglint warning 2019-09-13 13:45:22 +00:00
rillig
3ac301ed80 pkgtools/texlive2pkg: fix shell quoting, update to 1.8
Before this fix, running "texlive2pkg --help" in a directory that
contains a file named "d" would output only "d" instead of "[-d]".
2019-09-13 13:43:30 +00:00
rillig
06f9c49ddb pkgtools/url2pkg: refactor to group the subs that modify Makefile lines 2019-09-13 13:31:39 +00:00
rillig
8bc8671851 pkgtools/url2pkg: use MetaCPAN HOMEPAGE for Perl modules 2019-09-13 06:22:33 +00:00
rillig
fb81fe5b18 pkgtools/url2pkg: refactor code for determining WRKSRC into separate sub 2019-09-13 05:38:27 +00:00
rillig
b689ab5ca7 pkgtools/url2pkg: fix typo, left over from manual testing 2019-09-13 05:19:27 +00:00
rillig
58d2d50c2a pkgtools/pkglint: update to 5.7.24
Changes since 5.7.23:

* Improved the _VARGROUPS check for ignored variables
* Removed wrong warnings for variable expressions like ${VAR:Dyes:Uno}
* Used correct terminology for the :Q modifier (it's not an operator)
2019-09-12 21:15:48 +00:00
rillig
98ce03c078 pkgtools/url2pkg: replace CRLF with LF 2019-09-12 20:02:07 +00:00
rillig
68987c00b5 pkgtools/url2pkg: update to 2.36
Changes since 2.35:

* Added support for Module::Build Perl modules.
2019-09-12 18:23:00 +00:00
rillig
5467eed239 pkgtools/url2pkg: refactoring: don't use experimental smartmatch 2019-09-12 05:56:59 +00:00
rillig
dbcbecdd52 pkgtools/url2pkg: claim maintainership 2019-09-12 05:49:03 +00:00
rillig
8c03e5a125 pkgtools/url2pkg: strip leading v from distfile version number 2019-09-12 05:45:34 +00:00
rillig
9afe00458e pkgtools/url2pkg: update to 2.35
Changes since 2.34:

* Python packages get a PKGNAME variable containing PYPKGPREFIX
* Refactoring: merged duplicate code for reading dependencies
2019-09-12 04:18:28 +00:00
rillig
70d0f3ed60 pkgtools/url2pkg: split Perl package code into separate subs 2019-09-12 02:49:33 +00:00
rillig
46c30b6289 pkgtools/url2pkg: discover test cases automatically 2019-09-12 02:35:07 +00:00
rillig
5cc81c5b85 pkgtools/url2pkg: update to 2.34
Changes since 2.33:

* code cleanup in MakeMaker.pm
* don't create a PLIST for Perl packages

* allow Python dependencies from setup.py to use spaces around >=
* properly indented Python code according to PEP 8
* added mock for setuptools.find_package
* only try to migrate a package from GitHub to PyPI if it is really
  a Python package on GitHub
2019-09-11 05:25:55 +00:00
nia
83beeda6cf pkg_select: Add networking libs on SunOS 2019-09-09 10:03:21 +00:00
maya
45f14a7175 url2pkg 2.33: fix cargo packaging typo.
We don't have a third match to the regex.
2019-09-09 08:08:02 +00:00
rillig
38f0aa6a18 pkgtools/pkglint: update to 5.7.23
Changes since 5.7.22:

* Added a warning for lines that look empty but are actually follow-up
  lines from a previous line.

* Added notes for unusual placement of the continuation backslash. It
  should always be preceded by a single space or tab, or be in column
  73.

* Improved check for needlessly complicated !empty(PKGPATH:Mcat/pkg)
  that is transformed into the simpler ${PKGPATH} == cat/pkg, even if
  the package name contains hyphens, dots, plus or slashes.

* Added check for the _VARGROUPS section since that section contains
  many redundancies that can easily be checked. For example, in
  mk/compiler/gcc.mk the _VARGROUPS section is 67 lines long and
  contains far more than 100 variables. It's tedious to manually check
  this file for internal consistency. That's better left to pkglint.

* The empty variable is no longer flagged as "used but not defined".
  It appears in expressions like ${:Ustring}.

* When --source is combined with --explain, don't unnecessarily
  repeat the source code for a single line if there are several
  diagnostics. Instead, even omit the empty line between the diagnostics
  for the same line.
2019-09-08 22:47:47 +00:00
nia
dcb43af864 pkg: needs pthreads.
fixes build on netbsd-9.
2019-09-07 23:30:45 +00:00
nia
6610a0da5e pkg_select: remove Werror, helps building on netbsd-current 2019-09-07 23:18:57 +00:00
adam
435af01a8b Changed PYTHON_VERSIONS_INCOMPATIBLE to PYTHON_VERSIONS_ACCEPTED; needed for future Python 3.8 2019-09-02 13:19:35 +00:00
nia
4061210488 Switch packages using GLUT to FreeGLUT.
Start building FreeGLUT with GLUT compatibility on.

- GLUT's maintainance state is much worse than FreeGLUT's, with no
  substanital commits since 2011.
- GLUT can no longer be consider a core component of Mesa or X11.
- Nobody except us seems to be using it...

Other vendors still shipping GLUT:
- GoboLinux, T2 SDE, PLD Linux

Revbump packages using GLUT or freeglut by default.
2019-08-30 17:01:32 +00:00
nia
5ba9a08f9e x11-links-1.30: Add xproxymngproto.pc 2019-08-29 10:59:00 +00:00
gdt
e0be187af7 pkgtools/pkg_rolling-replace: Update to 0.24.8
Be more tolerant of not finding PKGPATH, and basically attempt to skip
the package rather than treating it as a fatal error.  (This was a
stray edit that I've been running with for a while.)
2019-08-27 19:30:36 +00:00
markd
361a8eacce texlive2pkg: update to 1.7
add option to derive doc tarball path from the base package path.
allow tarball path to be a url.
2019-08-27 06:21:18 +00:00
rillig
00b8c55b94 pkgtools/pkglint: update to 5.7.22
Changes since 5.7.21:

* The files from wip/mk do not belong to the main pkgsrc infrastructure.
  Therefore, when loading the package Makefile to look for defined but
  unused variables, parsing doesn't stop in these files.
2019-08-25 21:47:11 +00:00
rillig
397e7ee2b6 pkgtools/pkglint: update to 5.7.22
Changes since 5.7.21:

* The files from wip/mk do not belong to the main pkgsrc infrastructure.
  Therefore, when loading the package Makefile to look for defined but
  unused variables, parsing doesn't stop in these files.
2019-08-25 21:44:37 +00:00
rjs
f57dc4ec7f x11-links-1.29: Add libxshmfence. 2019-08-23 15:18:39 +00:00