@{disable dev devel gb-desktop-gnome-keyring gb-db-sqlite2 gb-qt4*}@

@{if version like debian*}@

@{if version = debian-11}@
@{disable gb-qt6*}@
@{endif}@
@{if version like {debian-11,debian-14}}@
@{disable gb-mongodb}@
@{endif}@
@{if version >= debian-13}@
@{disable gb-gtk-opengl}@
@{disable gb-qt5-webkit}@
@{endif}@
@{if version >= debian-14}@
@{disable gb-sdl gb-sdl-sound}@
@{endif}@

@{else}@

@{if version like {ubuntu-20.04,ubuntu-22.04}}@
@{disable gb-qt6*}@
@{endif}@
@{if version = ubuntu-20.04}@
@{disable gb-mongodb}@
@{disable gb-clipper2}@
@{endif}@
@{if version >= ubuntu-25.10}@
@{disable gb-gtk-opengl}@
@{endif}@
@{if version >= ubuntu-25.04}@
@{disable gb-qt5-webkit}@
@{endif}@

@{endif}@

@{merge gb-qt5 gb-qt5-x11 gb-qt5-wayland}@
@{merge gb-qt6 gb-qt6-x11 gb-qt6-wayland}@
@{merge gb-gtk3 gb-gtk3-x11 gb-gtk3-wayland}@
Source: gambas3
Section: devel
Priority: optional
Homepage: @{website-url}@
Vcs-Browser: @{git-url}@
Maintainer: Willy Raets <gbWilly@protonmail.com>
Build-Depends:  automake,
                autoconf,
                build-essential,
                debhelper-compat (=12),
                dh-autoreconf,
@{if version like {debian-11,ubuntu-20.04}}@
                gcc-10 [armhf], g++-10 [armhf],
@{else}@
                gcc-11 [armhf], g++-11 [armhf],
@{endif}@
                gettext,
                git,
                libalure-dev,
                libasound2-dev,
@{if version like {debian-11,ubuntu-20.04,ubuntu-22.04}}@
                libavcodec58,
                libavformat58,
@{endif}@
                libbz2-dev,
                libcairo2-dev,
@{if version like {debian-14,ubuntu-26.04}}@
                libcrypt-dev,
@{endif}@
                libcurl4-gnutls-dev,
                libdumb1-dev,
                libffi-dev,
@{if version = ubuntu-20.04}@
                libgdk-pixbuf2.0-dev,
@{else}@
                libgdk-pixbuf-2.0-dev,
@{endif}@
                libglew-dev,
                libglib2.0-dev,
                libgmime-3.0-dev,
                libgmp-dev,
                libgsl-dev,
                libgstreamer-plugins-base1.0-dev,
                libgstreamer1.0-dev,
                libgtk-3-dev,
                libgtk2.0-dev,
@{if gb-gtk-opengl?}@
                libgtkglext1-dev,
@{endif}@
                libimlib2-dev,
                libjack-dev,
                libjpeg-dev,
@{if gb-mongodb?}@
                libmongoc-dev,
@{endif}@
                @{if version like debian*}@default-@{endif}@libmysqlclient-dev,
                libncurses-dev,
@{if version like debian*}@
                libpcre@{if version >= debian-13}@2@{else}@3@{endif}@-dev,
@{else}@
                libpcre@{if version >= ubuntu-26.04}@2@{else}@3@{endif}@-dev,
@{endif}@
                libpoppler-cpp-dev,
                libpoppler-dev,
                libpoppler-glib-dev,
                libpoppler-private-dev,
                libpq-dev,
                libqt5opengl5-dev,
                libqt5svg5-dev,
@{if gb-qt5-webkit?}@
                libqt5webkit5-dev,
@{endif}@
                libqt5x11extras5-dev,
                librsvg2-dev,
                libsdl1.2-dev,
                libsdl-image1.2-dev,
                libsdl-mixer1.2-dev,
                libsdl-sound1.2-dev,
                libsdl-ttf2.0-dev,
                libsdl2-dev,
                libsdl2-image-dev,
                libsdl2-mixer-dev,
                libsdl2-ttf-dev,
                libsqlite3-dev,
                libssl-dev,
                libunwind-dev,
                libv4l-dev,
@{if version like debian*}@
                libwebkit2gtk-@{if version >= debian-13}@4.1@{else}@4.0@{endif}@-dev,
@{else}@
                libwebkit2gtk-@{if version >= ubuntu-24.04}@4.1@{else}@4.0@{endif}@-dev,
@{endif}@
                libxml2-dev,
                libxslt1-dev,
                libxtst-dev,
                libzstd-dev,
                linux-libc-dev,
@{if gb-qt6?}@
                qt6-base-dev,
                qt6-webengine-dev [amd64 arm64 armhf i386],
                qt6-svg-dev,
@{endif}@
                qtbase5-dev,
                qtwebengine5-dev [amd64 arm64 armhf i386],
                sane-utils,
                unixodbc-dev,
                xdg-utils
Standards-Version: 4.5.0

Package: gambas3
Architecture: all
Section: devel
Depends: ${misc:Depends},@{dependencies all}@
Description: Complete visual development environment for Gambas
 Gambas is a free development environment based on a Basic interpreter
 with object extensions, like Visual Basic(tm) (but it is NOT a clone!).
 With Gambas, you can quickly design your program GUI, access MySQL or
 PostgreSQL databases, pilot KDE applications with DCOP, translate your
 program into many languages, and so on...
 .
 This package doesn't include anything: it is a metapackage that installs the
 IDE and all the available Gambas components and tools.

Package: gambas3-dev-tools
Architecture: any
Section: devel
Depends: ${misc:Depends},
         ${shlibs:Depends},
         gambas3-runtime (>= ${binary:Version})
Breaks: gambas3-dev (<< 3.15.0), gambas3-devel (<< 3.19.6)
Replaces: gambas3-dev, gambas3-devel
@{desc dev-tools}@

Package: gambas3-gui
Architecture: all
Section: libdevel
Depends: gambas3-gb-gtk (>= ${binary:Version}) | gambas3-gb-gtk3 (>= ${binary:Version})@{if gb-qt4?}@ | gambas3-gb-qt4 (>= ${binary:Version})@{endif}@ | gambas3-gb-qt5 (>= ${binary:Version})@{if gb-qt6?}@ | gambas3-gb-qt6 (>= ${binary:Version})@{endif}@
@{desc gui}@

Package: gambas3-gui-opengl
Architecture: all
Section: libdevel
Depends: gambas3-gb-gtk-opengl (>= ${binary:Version}) | gambas3-gb-gtk3-opengl (>= ${binary:Version})@{if gb-qt4?}@ | gambas3-gb-qt4-opengl (>= ${binary:Version})@{endif}@ | gambas3-gb-qt5-opengl (>= ${binary:Version})@{if gb-qt6?}@ | gambas3-gb-qt6-opengl (>= ${binary:Version})@{endif}@
@{desc gui-opengl}@

Package: gambas3-gui-webview
Architecture: all
Section: libdevel
Depends: gambas3-gb-gtk3-webview (>= ${binary:Version})@{if gb-qt4?}@ | gambas3-gb-qt4-webview (>= ${binary:Version})@{endif}@ | gambas3-gb-qt5-webview (>= ${binary:Version})@{if gb-qt6?}@ | gambas3-gb-qt6-webview (>= ${binary:Version})@{endif}@
@{desc gui-webview}@

Package: gambas3-ide
Architecture: all
Section: devel
Depends: ${misc:Depends},
         debhelper,
         fakeroot,
         gettext,
         rpm,
         tar,
         wget,
         @{if version like {debian-12,debian-13,ubuntu-24.04,ubuntu-25.04}}@
         makepkg,
         @{endif}@
         @{dependencies ide}@
@{desc ide}@

Package: gambas3-runtime
Architecture: any
Section: libdevel
Depends: ${misc:Depends},
         ${shlibs:Depends}
Breaks: gambas3-gb-hash, 
        gambas3-gb-jit
Replaces: gambas3-gb-hash,
          gambas3-gb-jit
Conflicts: gambas3-gb-gui,
           gambas3-gb-gui-opengl
@{desc runtime}@

Package: gambas3-scripter
Architecture: all
Section: libdevel
Depends: ${misc:Depends},
         gambas3-dev-tools (>= ${binary:Version}),
         gambas3-gb-pcre (>= ${binary:Version}),
         gambas3-runtime (>= ${binary:Version})
Breaks: gambas3-script (<< 3.15.0)
Replaces: gambas3-script
@{desc scripter}@

@{package gb.desktop
Depends: xdg-utils
}@

@{package gb.scanner
Depends: sane-utils
}@

@{package gb.gtk3
Breaks: gambas3-gb-gtk3-x11,
        gambas3-gb-gtk3-wayland
Replaces: gambas3-gb-gtk3-x11,
          gambas3-gb-gtk3-wayland
}@

@{package gb.qt5
Breaks: gambas3-gb-qt5-x11,
        gambas3-gb-qt5-wayland
Replaces: gambas3-gb-qt5-x11,
          gambas3-gb-qt5-wayland
}@

@{package gb.qt6
Breaks: gambas3-gb-qt6-x11,
        gambas3-gb-qt6-wayland
Replaces: gambas3-gb-qt6-x11,
          gambas3-gb-qt6-wayland
}@

@{package}@

