I have a question about the structure of the source code from a cygport package.
Here is the contents of a Cygports source file:
- the actual source bundle for the project (tar.gz, tar.bz2, etc.)
- the any number of *.patch files.
- a .cygport file
I am trying to build gedit-3.4.2 from cygports repository.
How does the .cygport file help me run the proper options in the ./configure ?
For instance, in gedit if i don’t specify –disable-spell it won’t proceed due to error. How do I get the list of ./configure options that were used to build the project when the cygport was built?
Is there some way we can use the cygport executable to build the cygport and change the prefix too?
Here is the contents of gedit-3.4.2-1.cygport:
inherit python gnome2
DESCRIPTION="GNOME text editor"
PATCH_URI="3.4.2-cygwin.patch"
DEPEND="gnome-common gtk-doc
girepository(Gtk-3.0)
pkgconfig(enchant)
pkgconfig(gtksourceview-3.0)
pkgconfig(libpeas-gtk-1.0)"
PKG_NAMES="${PN} ${PN}-devel"
PKG_HINTS="setup devel"
gedit_CONTENTS="--exclude=gtk-doc --exclude=libgedit* etc/ usr/bin/ usr/lib/gedit/ ${PYTHON_SITELIB#/} usr/share/"
gedit_devel_CONTENTS="usr/include/ usr/lib/gedit/libgedit* usr/lib/pkgconfig/ usr/share/gtk-doc/"
DIFF_EXCLUDES="*.desktop.in *.schemas.in *-marshal.h"
CYGCONF_ARGS="--libexecdir=/usr/lib --enable-python"
KEEP_LA_FILES="none"
EDIT Someone from Cygwin Ports mailing list said:
“The configure options are
--libexecdir=/usr/lib --enable-python
Which is from CYGCONF_ARGS.”
You’d do better to think of it as a Cygwin package source file.
cygportis simply a tool for automating the creation of Cygwin binary and source packages. It is the primary tool available, but unlike with some other packaging systems, there’s really nothing forcing you to use it. It is quite possible to build a Cygwin package entirely by hand, since it is really nothing more than a tarball that Cygwin’ssetup.execan blindly unpack into the Cygwin root directory (typicallyc:\cygwin) with the expectation that this will put the package’s files in sensible locations.Before
cygportexisted, people did build their own ad hoc packaging systems. Many Cygwin package maintainers still use these tools they created. (Yours truly included; two of my three packages usecygport, but the third still uses a custom build system.)Ultimately, you want to read the
cygportmanual, in/usr/share/doc/cygport/manual.html.(Yes, I know, “RTFM” answers are frowned on here. But, as one who currently maintains two
cygportbased packages in the official Cygwin package repository, please believe me when I tell you that the manual is still the single best resource available on this topic.)As you found out through other resources, you’d first need to edit the
CYGCONF_ARGSvalue in the.cygportfile.The simplest possible step after that is
cygport gedit-3.4.2-1.cygport all. That attempts to rebuild all the binary packages in a single step. It also builds a new source package containing updated.cygportand patch files.If something breaks in the
allbuild process, it is usually faster to switch to using the sub-commands contained byallinstead of completely restarting the process. Theallstep just runsprep,compile,install,package, andfinishfor you, in that order. For instance, ifallfails during the compilation step, there’s probably no need to repeat theprepstep.(It is exceptionally uncommon for
cygportor a sane build system to wreck the build tree, forcing you to re-runprep. Far more commonly, you end up needing to re-doprepwhen you manually wreck the build tree while trying to get a new package to build for the first time and need to start over.)You can probably fix that by installing the
libaspell-develpackage from the official Cygwin package repository withsetup.exe.Personally, I wouldn’t disable any feature unless it meant installing unofficial packages, such as those from the Cygwin Ports project.[*] It is nice to have Cygwin Ports repository, but because it contains so many packages, installing one can end up creating an “install the world” situation: package A depends on packages B, C and D, and C depends on E, F, G, H, and G depends on I, J, K, and… Dependency hierarchies within the Cygwin package repo tend to be flatter and narrower than those in the Cygports repo.
You have guessed that you just add
--prefix=/my/private/program/treetoCYGCONF_ARGS, I trust.[*] If you are feeling confused about “Cygwin Ports” and
cygport, the naming similarity is no coincidence.cygportis a tool created by Yaakov Selkowitz for himself when creating the Cygwin Ports package repository. Later, it became popular enough among other Cygwin package maintainers that it pushed out most of the competing build systems.