NAME="cygwin" VERSION="3.3.0" RELEASE="0.1.199482654b07" HOMEPAGE="https://cygwin.com/" GIT_URI="https://cygwin.com/git/newlib-cygwin.git" # Release #GIT_TAG="cygwin-${PV//\./_}-release" # Test GIT_REV="199482654b07" inherit git TOOLCHAIN_TARGET="native" inherit toolchain # From .appveyor.yml in Cygwin git repo BUILD_REQUIRES="\ gcc-core \ gcc-g++ \ autoconf \ automake \ make \ perl \ patch \ cocom \ gettext-devel \ libiconv-devel \ zlib-devel \ mingw64-${ARCH}-gcc-core \ mingw64-${ARCH}-gcc-g++ \ mingw64-${ARCH}-zlib \ dejagnu \ dblatex \ docbook2X \ docbook-xml45 \ docbook-xsl \ texlive-collection-latexrecommended \ texlive-collection-fontsrecommended \ texlive-collection-pictures \ xmlto \ python38-lxml \ python38-ply" PKG_NAMES="cygwin cygwin-devel cygwin-doc" # cygwin base package cygwin_CATEGORY="Base" cygwin_SUMMARY="The UNIX emulation engine" cygwin_DESCRIPTION="The UNIX emulation engine" cygwin_CONTENTS="--exclude=cygwin1.dbg etc/defaults/ usr/bin/ usr/sbin/ usr/share/cygwin/ usr/share/doc/Cygwin/" # cygwin-devel package cygwin_devel_CATEGORY="Devel" cygwin_devel_SUMMARY="Core development files" cygwin_devel_DESCRIPTION="Core development files required to build Cygwin packages" cygwin_devel_CONTENTS="usr/include/ usr/lib/" # cygwin doc package cygwin_doc_CATEGORY="Doc" cygwin_doc_SUMMARY="Cygwin-specific documentation, including man pages" cygwin_doc_DESCRIPTION="Documentation for Cygwin and newlib, including man pages and texinfo files." cygwin_doc_CONTENTS="usr/share/man/ usr/share/info/ usr/share/doc/cygwin-doc/ usr/share/doc/newlib/ etc/postinstall/ etc/preremove/" PKG_IGNORE="usr/bin/cygwin1.dbg" DIFF_EXCLUDES="libc.info libm.info parser.out parsetab.py" # This is needed since we otherwise end up with two dirs in usr/share/doc # which only differ by case, "cygwin" and "Cygwin". That's not feasible for # the distro. Therefore we suppress generation of the default docs and create # our own cygwin-${PV} dir for the docs in src_install. RESTRICT="postinst-doc" CYGCONF_ARGS="--docdir=/usr/share/doc/cygwin-doc --htmldir=\${docdir}/html" src_compile() { cd ${S} winsup/autogen.sh cd ${B} # cygport compiles with _FORTIFY_SOURCE=2 -fstack-protector by default. # This doesn't work for the lib itself CFLAGS+=" -Wp,-U_FORTIFY_SOURCE -fno-stack-protector" CXXFLAGS+=" -Wp,-U_FORTIFY_SOURCE -fno-stack-protector" cygconf cygmake # make newlib info and manpage documentation cd ${B}/${CHOST}/newlib cygmake info man } src_install() { cd ${B} # tooldir and gcc_tooldir must be set to install correctly even when # building on a non-Cygwin build machine. cyginstall -j1 tooldir=/usr gcc_tooldir=/usr # Workaround the problem that the Cygwin DLL is already stripped and # a cygwin1.dbg file exists. insinto /usr/lib/debug/usr/bin doins ${B}/${ARCH}-pc-cygwin/winsup/cygwin/cygwin1.dbg dosym ../lib/debug/usr/bin/cygwin1.dbg /usr/bin/cygwin1.dbg # install newlib info and manpage documentation cd ${B}/${CHOST}/newlib cygmake DESTDIR=${D} install-info install-man # cygwin-doc postinstall cd ${I} cd ${B}/${CHOST}/winsup/doc cygmake DESTDIR=${D} install-etc cd ${S} docinto /cygwin-doc dodoc winsup/COPYING winsup/CYGWIN_LICENSE README docinto /newlib dodoc COPYING.NEWLIB newlib/HOWTO newlib/NEWS newlib/README cd ${D} rm -rf usr/include/iconv.h usr/include/unctrl.h usr/include/rpc \ usr/lib/libiberty.a usr/share/locale \ usr/share/info/standards.info usr/share/info/configure.info } SCALLYWAG="nobuild"