Sure, attached.

It's very similar to the old astyle-2.06-1.cygport:

--- astyle-2.06-1.cygport 2025-01-30 06:35:58.321284100 -0500
+++ astyle-3.6.6.cygport 2025-01-30 06:33:35.048925600 -0500
@@ -1,10 +1,10 @@
 HOMEPAGE="http://astyle.sourceforge.net/";
-SRC_URI="mirror://sourceforge/astyle/${PN}_${PV}_linux.tar.gz"
+SRC_URI="
https://gitlab.com/saalen/astyle/-/archive/3.6.6/astyle-3.6.6.tar.gz";
 PKG_HINTS=setup
 CATEGORY="Devel Utils"
 SUMMARY="Artistic Style is a reindenter and reformatter of C, C++, C# and
Java source code."
 DESCRIPTION="Artistic Style is a reindenter and reformatter of C, C++, C#
and Java source code."
-SRC_DIR=astyle
+SRC_DIR=astyle-3.6.6

 # We use the standard src_compile and src_test.

@@ -12,12 +12,12 @@

 src_compile() {
     lndirs
-    cd ${B}/build/gcc
+    cd ${B}/AStyle/build/gcc
     cygmake
 }

 src_install() {
-    cd ${B}/build/gcc
+    cd ${B}/AStyle/build/gcc
     dobin bin/astyle.exe
     dodoc ../../doc/*.html
 }


There's a .patch file, too, to get astyle_main.cpp to compile. (I opened an
issue on the upstream site.)

On Thu, Jan 30, 2025 at 11:05 AM Marco Atzeri via Cygwin-apps <
cygwin-apps@cygwin.com> wrote:

> On 30/01/2025 13:36, Michael Cook via Cygwin-apps wrote:
> > The astyle version used in the Cygwin package is 2.06 from 2016.
> >
> > I have a working package using the latest astyle release 3.6.6.
> > * `cygport download all-test check` succeeds
> > * running the resulting astyle.exe in an existing source code repo worked
> > as expected
> >
> > What's the next step?
> >
> > This would be my first contribution to Cygwin.
> >
> > Michael
>
> Hi Michael,
>
> Can you provide the cygport file as attachment ?
> We can review it and comment if needed.
>
> After GTG (Good to Go) approval from other packagers
> and you providing  your SSH Key
>
>    https://cygwin.com/packaging/key.html#sshkey
>
> you can follow the upload procedure
>
>    https://cygwin.com/package-upload.html
>
> There is also a build server that from the git package repository,
> can build, package , test and upload with you.
>
> https://cygwin.com/packaging/build.html
> https://cygwin.com/cgi-bin2/jobs.cgi
>
> It is very convenient for any future release, as the workload
> is not on your machine and the build is sanitized as enviroment.
>
> Regards
> Marco
>
>
--- AStyle/src/astyle_main.cpp.~1~	2025-01-30 07:11:57.958757200 -0500
+++ AStyle/src/astyle_main.cpp	2025-01-30 07:12:41.936562100 -0500
@@ -1,3 +1,4 @@
+#define _DEFAULT_SOURCE 1 // enable declaration for realpath(3)
 // astyle_main.cpp
 // Copyright (c) 2024 The Artistic Style Authors.
 // This code is licensed under the MIT License.

Attachment: astyle-3.6.6.cygport
Description: Binary data

Reply via email to